{"id":"CVE-2026-71867","aliases":["GHSA-2w86-xfrc-g85r"],"url":"https://o3.security/vulnerability/CVE-2026-71867","summary":"Orval: RCE via schema property name -> computed-property-key injection in the MSW mock generator","details":"### Summary\n\norval, when generating MSW mocks (output.mock: true), emits each schema property name as a single-quoted object key in the mock factory WITHOUT escaping the single quote. A ' in a property name closes the key and lands in object-literal context, where an injected computed property key [expr] is evaluated when the mock factory is called (e.g. in tests / MSW handlers) -> RCE. The property name is a pure data field. Verified on orval 8.19.0 / Node. \n\n### Details\n\n```ts\nexport const getOpResponseMock = (...): Thing => ({'x': 0, [require(\"fs\").writeFileSync(\"PWNED\",\"\")]: 0, 'y': faker...., ...overrideResponse});\n```\n\nSafe elsewhere: the zod schema double-quotes the property name; the TS interface key is a type (DoS only). Distinct from orval's $ref / route-path / server-url / zod-default findings.\n\n### PoC\n\nreproduce.sh (+ make_spec.py) attached: a property name `x': 0, [require(\"fs\").writeFileSync(\"<marker>\",\"\")]: 0, 'y` -> mock object literal; calling the mock factory writes the marker. Verified on 8.19.0.\n\n### Impact\n\nJavaScript / OS command execution (via child_process) on the machine of anyone who generates orval mocks from an attacker controlled spec and runs them (tests / MSW).\n\n### Suggested fix\n\nEscape the property name for the JS string key (JSON.stringify), and never interpolate a raw property name adjacent to [ ] in object-literal position.","published":"2026-08-19T17:38:36.371Z","modified":"2026-09-11T03:30:49.851902236Z","cvss":null,"epss":{"score":0.00607,"percentile":0.47466,"asOf":"2026-09-16"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"orval","fixedVersion":"8.21.0"}],"fix":{"url":"https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6","label":"orval-labs/orval@8ef1bfd"},"references":[{"type":"WEB","url":"https://github.com/orval-labs/orval/releases/tag/v8.21.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71867.json"},{"type":"ADVISORY","url":"https://github.com/orval-labs/orval/security/advisories/GHSA-2w86-xfrc-g85r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71867"},{"type":"FIX","url":"https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6"},{"type":"FIX","url":"https://github.com/orval-labs/orval/pull/3692"},{"type":"PACKAGE","url":"https://github.com/orval-labs/orval"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-09-11T03:30:49.851902236Z"}}