{"id":"GHSA-2w86-xfrc-g85r","summary":"Orval: RCE via schema property name -\u003e 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) -\u003e 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 =\u003e ({'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(\"\u003cmarker\u003e\",\"\")]: 0, 'y` -\u003e 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.","aliases":["CVE-2026-71867"],"modified":"2026-09-03T18:30:03.624241516Z","published":"2026-09-03T18:26:12Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2026-09-03T18:26:12Z","nvd_published_at":"2026-08-19T18:17:24Z","cwe_ids":["CWE-89","CWE-95"],"severity":"CRITICAL"},"references":[{"type":"WEB","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":"WEB","url":"https://github.com/orval-labs/orval/pull/3692"},{"type":"WEB","url":"https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6"},{"type":"PACKAGE","url":"https://github.com/orval-labs/orval"},{"type":"WEB","url":"https://github.com/orval-labs/orval/releases/tag/v8.21.0"}],"affected":[{"package":{"name":"orval","ecosystem":"npm","purl":"pkg:npm/orval"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"8.21.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-2w86-xfrc-g85r/GHSA-2w86-xfrc-g85r.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}