{"id":"CVE-2026-23947","published":"2026-01-20T00:19:48Z","modified":"2026-01-21T17:09:11Z","title":"Orval MCP client is vulnerable to code injection via unsanitized x-enum-descriptions in enum generation","vendor":"orval-labs","product":"orval","tier":"tail","description":{"text":"Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions prior to 7.19.0 until 8.0.2 are vulnerable to arbitrary code execution in environments consuming generated clients. This issue is similar in nature to CVE-2026-22785, but affects a different code path in @orval/core that was not addressed by CVE-2026-22785's fix. The vulnerability allows untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript code into generated clients via the x-enumDescriptions field, which is embedded without proper escaping in getEnumImplementation(). I have confirmed that the injection occurs during const enum generation and results in executable code within the generated schema files. Orval 7.19.0 and 8.0.2 contain a fix for the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00839,"percentile":0.58729,"provenance":"source"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"references":[{"url":"https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/orval-labs/orval/releases/tag/v8.0.2","tags":["x_refsource_MISC"]}],"priority":{"score":23.3,"factors":[{"name":"EPSS percentile","points":11.75},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.51}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-01-21","earliestUrl":"https://github.com/boroeurnprach/CVE-2026-23947-PoC","repos":[{"name":"boroeurnprach/CVE-2026-23947-PoC","url":"https://github.com/boroeurnprach/CVE-2026-23947-PoC","stars":0,"created":"2026-01-21"}]},"first":{"date":"2026-01-21","source":"PoC-in-GitHub","url":"https://github.com/boroeurnprach/CVE-2026-23947-PoC"},"provenance":"source"},"vendorSlug":"orval-labs","affectedVersions":[{"vendor":"orval-labs","product":"orval","versions":[">= 8.0.0-rc.0, < 8.0.2","< 7.19.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-01-20T17:04:30.700710Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@orval/core","vulnerableRanges":[">=8.0.0-rc.0, <8.0.2","<7.19.0"],"patched":["8.0.2","7.19.0"],"from":["GHSA-h526-wf6g-67jv"],"provenance":"source"}],"summary":{"text":"Orval, the tool that generates TypeScript/JavaScript API clients from OpenAPI v3 and Swagger v2 specifications, does not sanitize the x-enumDescriptions field when it builds const enums in getEnumImplementation() in @orval/core, so untrusted spec content can inject executable code into the generated schema files. An attacker who can supply a malicious OpenAPI specification to a consuming environment can achieve arbitrary code execution, with no authentication, no user interaction, and network-reachable delivery of the spec required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:04Z"},"euvd":{"id":"EUVD-2026-3590","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-orval-labs-orval-cve-2026-23947","children":[{"from":"CVE-2026-23947","to":"CVE-2026-25141","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"Versions starting with 7.19.0 and prior to 7.21.0 and 8.2.0 have an incomplete fix for CVE-2026-23947.","from":"CVE.org","in":"CVE-2026-25141"},{"kind":"osv-related","provenance":"source","id":"GHSA-h526-wf6g-67jv","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-gch2-phqh-fg9q","via":"reference","url":"https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jv"},{"kind":"version-step","provenance":"source","package":"npm:@orval/core","fromFixed":"8.0.2","toFixed":"8.2.0","daysApart":10},{"kind":"version-step","provenance":"source","package":"npm:@orval/core","fromFixed":"7.19.0","toFixed":"7.21.0","daysApart":10}]}],"packageHistory":[{"cve":"CVE-2026-23947","published":"2026-01-20","fixed":"8.0.2","kev":false},{"cve":"CVE-2026-25141","published":"2026-01-30","fixed":"8.2.0","kev":false}],"package":"npm:@orval/core"}}