CVE-2026-71867: Orval: RCE via schema property name -> computed-property-key injection in the MSW mock generator
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a single quote in a schema property name is emitted into single-quoted object keys in generated MSW mock factories without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated mock factory is called by tests or an MSW handler, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/keys.ts function getKey and MSW mock generation. This issue is fixed in version 8.21.0.
Security readout for executives and security teams
Plain-English summary
Orval versions before 8.21.0 can turn a malicious OpenAPI or Swagger property name into executable JavaScript inside generated MSW mocks. The code runs when the mock factory is invoked, potentially compromising developer machines, CI pipelines, tests, or applications that execute those mocks.
Executive priority
Treat this as an urgent software-supply-chain remediation for teams using Orval-generated MSW mocks. Prioritize environments where external specifications enter automated generation and CI has secrets or deployment access. Systems not generating or executing MSW mocks have materially lower exposure based on the supplied evidence.
Technical view
Orval’s MSW generator placed schema property names inside single-quoted object keys without safe encoding. An attacker able to influence an input specification could inject JavaScript into generated output. Execution is deferred until a generated mock factory or associated MSW handler runs. Version 8.21.0 fixes the encoding flaw.
Likely exposure
Exposure requires Orval earlier than 8.21.0, MSW mock generation, attacker-influenced schema content, and execution of the generated mock. Risk is greatest where specifications come from external, shared, or insufficiently trusted sources and generated mocks run with CI or developer privileges.
Exploitation context
The supplied sources do not establish active exploitation, and the CVE is not identified as KEV. Exploitation nevertheless has low stated complexity and requires no privileges or user interaction under the supplied CVSS assessment. Practical compromise depends on controlling schema input and triggering the generated mock.
Researcher notes
The vulnerable path is identified as getKey in packages/core/src/getters/keys.ts and downstream MSW generation. The issue is computed-property-key injection leading to JavaScript evaluation, although the record also lists CWE-89 and CWE-95. Evidence supplied does not quantify affected deployments or confirm exploitation in the wild.
Mitigation direction
Upgrade Orval to version 8.21.0 or later.
Regenerate MSW mocks after upgrading; existing generated files may retain unsafe output.
Restrict schema inputs to trusted, reviewed sources until remediation is complete.
Review CI and test credentials accessible when generated mocks execute.
Validation and detection
Confirm installed and locked Orval versions across repositories and CI environments.
Identify projects using Orval’s MSW mock generator.
Determine whether schema property names can originate from untrusted or externally managed specifications.
Regenerate mocks with the fixed version and review resulting repository changes.
Investigate prior runs involving unexpected schema changes or generated JavaScript.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-89: Database access and collection lookup
Injection into data stores can inform collection, data access, and exfiltration detection reviews. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: yesTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.