{"cve":"CVE-2026-23947","nvd":{"published":"2026-01-20T01:15:57.583","modified":"2026-06-17T10:22:19.970","status":"Analyzed","description":"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.","cvss_v4":{"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","score":9.3},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-94","CWE-77"],"references":["https://github.com/orval-labs/orval/releases/tag/v8.0.2","https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jv"],"products":["orval:orval"],"source":"nvd","synced_at":"2026-10-19T22:21:16.563232421+00:00"},"epss":{"cve":"CVE-2026-23947","score":0.00839,"percentile":0.57851,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-h526-wf6g-67jv","url":"https://osv.dev/vulnerability/GHSA-h526-wf6g-67jv","summary":"Orval has a code injection via unsanitized x-enum-descriptions in enum generation","modified":"2026-02-28T06:26:32.655069Z","packages":[{"ecosystem":"npm","name":"@orval/core","purl":"pkg:npm/%40orval/core","ranges":[">=8.0.0-rc.0 <8.0.2"],"fixed":["8.0.2"]},{"ecosystem":"npm","name":"@orval/core","purl":"pkg:npm/%40orval/core","ranges":["<7.19.0"],"fixed":["7.19.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}