{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-24132","id":"CVE-2026-24132","title":"Orval Mock Generation Code Injection via const","description":"Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions \n7.19.0 and below and 8.0.0-rc.0 through 8.0.2 allow untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript into generated mock files via the const keyword on schema properties. These const values are interpolated into the mock scalar generator (getMockScalar in pac","descriptionLong":"Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions \n7.19.0 and below and 8.0.0-rc.0 through 8.0.2 allow untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript into generated mock files via the const keyword on schema properties. These const values are interpolated into the mock scalar generator (getMockScalar in packages/mock/src/faker/getters/scalar.ts) without proper escaping or type-safe serialization, which results in attacker-controlled code being emitted into both interface definitions and faker/MSW handlers. The vulnerability is similar in impact to the previously reported enum x-enumDescriptions (GHSA-h526-wf6g-67jv), but it affects a different code path in the faker-based mock generator rather than @orval/core. The issue has been fixed in versions 7.20.0 and 8.0.3.","published":"2026-01-22T23:47:45.846Z","updated":"2026-10-28T02:30:32.219562072Z","reserved":"2026-01-21T18:38:22.474Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"GitHub_M"},{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"high","source":"github.com"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"}],"rating":"high","products":["orval-labs orval"],"affectedProducts":[{"vendor":"orval-labs","product":"orval","defaultStatus":null,"versions":[{"version":"< 7.20.0","status":"affected"},{"version":">= 8.0.0-rc.0, < 8.0.3","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"@orval/mock","purl":"pkg:npm/%40orval/mock","ranges":["<7.20.0",">=8.0.0-rc.0 <8.0.3"],"fixed":["7.20.0","8.0.3"],"advisory":"GHSA-f456-rf33-4626"}],"cwes":["CWE-77","CWE-94"],"aliases":["GHSA-f456-rf33-4626"],"references":[{"url":"https://github.com/orval-labs/orval/security/advisories/GHSA-f456-rf33-4626","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/orval-labs/orval/pull/2828","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/orval-labs/orval/pull/2829","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/orval-labs/orval/pull/2830","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/orval-labs/orval/commit/44ca8c1f5f930a3e4cefb6b79b38bcde7f8532a5","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/orval-labs/orval/commit/6d8ece07ccb80693ad43edabccb3957aceadcd06","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/orval-labs/orval/commit/9b211cddc9f009f8a671e4ac5c6cb72cd8646b62","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/orval-labs/orval/releases/tag/v7.20.0","tags":["x_refsource_MISC","Product","Release Notes","web"]},{"url":"https://github.com/orval-labs/orval/releases/tag/v8.0.3","tags":["x_refsource_MISC","Product","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/24xxx/CVE-2026-24132.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24132","tags":["advisory"]},{"url":"https://github.com/orval-labs/orval","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00743,"epssPercentile":0.55478,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-24132","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24132","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-24132","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-f456-rf33-4626","ok":true,"note":"GHSA-f456-rf33-4626"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-24132","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}