Severity by source
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Malicious spec can be remote (AV:N) and trigger is trivial (AC:L, PR:N), but a developer/CI must generate and run the mocks, so UI:R; execution yields full C/I/A impact on that host.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
4DescriptionCVE.org
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.
AnalysisAI
Code injection in Orval, a TypeScript/JavaScript API client generator, allows a malicious OpenAPI v3 or Swagger v2 specification to achieve arbitrary code execution in developer, CI, test, or application environments when versions prior to 8.21.0 generate MSW mock factories. The getKey function in packages/core/src/getters/keys.ts wraps non-identifier schema property names in single-quoted object keys without escaping embedded single quotes, so an attacker-controlled property name can break out of the string literal and inject JavaScript that runs when the generated mock factory is invoked by tests or an MSW handler. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | Requires (1) the victim to run Orval versions before 8.21.0 against an attacker-influenced OpenAPI v3 / Swagger v2 spec, (2) the spec to contain a schema property name that is not a valid ES5 identifier and includes a single quote (the exact injection vector, e.g. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | The vendor CVSS 4.0 score of 9.3 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) reflects worst-case unauthenticated remote code execution, but the realistic risk is more nuanced and the UI:N and PR:N metrics deserve scrutiny. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | An attacker publishes or contributes an OpenAPI spec (e.g., a shared/third-party API definition) containing a schema property named `x':[require('child_process').execSync('id'),`. A developer runs Orval to generate the client with MSW mocks, and the malicious quote breaks out of the generated object key; when the mock factory is called during `npm test` or by an MSW handler, the injected code executes on the developer's workstation or in CI. … |
| Remediation | Vendor-released patch: upgrade Orval to version 8.21.0 or later, which routes non-identifier keys through the new jsStringLiteralEscape/jsesc encoder (fix in PR https://github.com/orval-labs/orval/pull/3692, commit 8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6, release https://github.com/orval-labs/orval/releases/tag/v8.21.0, advisory GHSA-2w86-xfrc-g85r). … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
Within 24 hours, inventory all projects and CI/CD pipelines using Orval and document current versions deployed. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
orval (TypeScript API client generator) before 7.18.0 has code injection via OpenAPI specification summary fields in MCP
Orval TypeScript code generator versions 7.19+ have a command injection vulnerability allowing RCE through malicious Ope
Orval, a TypeScript API client generator, has a command injection vulnerability that allows code execution through malic
Code injection in Orval TypeScript API client generator versions 7.19.0 to before 7.22.0. Generated client code may be v
Arbitrary code execution in Orval before 8.21.0 arises when the code generator emits an unescaped backtick (or ${...}) f
Arbitrary code execution in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swag
Code execution in Orval before 8.21.0 occurs when its zod schema generator processes an attacker-controlled OpenAPI v3 o
Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 / Swagger v2 specification achieve arbitrar
Arbitrary code execution in Orval (OpenAPI/Swagger TypeScript client generator) before 8.21.0 lets an attacker who contr
Code injection in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swagger v2 spe
Code injection in Orval, a TypeScript client generator for OpenAPI v3 and Swagger v2 specs, allows arbitrary JavaScript
Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 or Swagger v2 specification execute arbitra
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-62607