CVE-2026-71869: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
CVE-2026-71869 is a critical code injection vulnerability in orval-labs' orval tool prior to version 8.21.0. The vulnerability arises because attacker-controlled JavaScript expressions in array item defaults are emitted unsafely into module-level template literals during zod schema generation. This can lead to arbitrary code execution when the generated schema module is imported in developer, CI, test, or application environments. The issue is fixed in version 8.21.0.
AI Analysis
Technical Summary
Orval is a tool that generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. In versions prior to 8.21.0, the function formatDefaultValue in packages/zod/src/index.ts emits ${...} expressions or backticks in array item defaults directly into module-level template literals without safe encoding. This improper control of code generation (CWE-94) allows attacker-controlled JavaScript code to be evaluated upon importing the generated zod schema module, resulting in code execution in various environments such as developer machines, CI pipelines, testing, or applications. The vulnerability is addressed in orval version 8.21.0.
Potential Impact
An attacker who can influence the OpenAPI or Swagger specification inputs that orval processes can inject arbitrary JavaScript code that executes when the generated zod schema module is imported. This leads to remote code execution in the environments where the generated code is used, potentially compromising developer systems, continuous integration pipelines, testing environments, or applications relying on the generated clients.
Mitigation Recommendations
Upgrade orval to version 8.21.0 or later, where this vulnerability is fixed. There is no indication of alternative mitigations or temporary workarounds. Users should ensure they do not use vulnerable versions in their development or deployment pipelines.
CVE-2026-71869: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Description
CVE-2026-71869 is a critical code injection vulnerability in orval-labs' orval tool prior to version 8.21.0. The vulnerability arises because attacker-controlled JavaScript expressions in array item defaults are emitted unsafely into module-level template literals during zod schema generation. This can lead to arbitrary code execution when the generated schema module is imported in developer, CI, test, or application environments. The issue is fixed in version 8.21.0.
CVSS v4.0
Score 9.3critical
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Orval is a tool that generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. In versions prior to 8.21.0, the function formatDefaultValue in packages/zod/src/index.ts emits ${...} expressions or backticks in array item defaults directly into module-level template literals without safe encoding. This improper control of code generation (CWE-94) allows attacker-controlled JavaScript code to be evaluated upon importing the generated zod schema module, resulting in code execution in various environments such as developer machines, CI pipelines, testing, or applications. The vulnerability is addressed in orval version 8.21.0.
Potential Impact
An attacker who can influence the OpenAPI or Swagger specification inputs that orval processes can inject arbitrary JavaScript code that executes when the generated zod schema module is imported. This leads to remote code execution in the environments where the generated code is used, potentially compromising developer systems, continuous integration pipelines, testing environments, or applications relying on the generated clients.
Mitigation Recommendations
Upgrade orval to version 8.21.0 or later, where this vulnerability is fixed. There is no indication of alternative mitigations or temporary workarounds. Users should ensure they do not use vulnerable versions in their development or deployment pipelines.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-07T18:26:53.524Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a85eb30acd9273b49667230
Added to database: 08/19/2026, 17:43:12 UTC
Last enriched: 08/19/2026, 17:52:55 UTC
Last updated: 08/19/2026, 22:13:33 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.