CVE-2026-71868: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
CVE-2026-71868 is a critical code injection vulnerability in orval-labs' orval tool prior to version 8.21.0. The issue arises from unsafe encoding of ${...} expressions or backticks in enum default values, which are emitted into module-level template literals during zod schema generation. This flaw allows attacker-controlled JavaScript code to be executed when the generated zod schema module is imported, potentially impacting developer, CI, test, or application environments. The vulnerability 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 before 8.21.0, the function formatDefaultValue in packages/zod/src/index.ts emits ${...} expressions or backticks found in enum defaults directly into module-level template literals without safe encoding. This improper control of code generation (CWE-94) permits injection and evaluation of attacker-controlled JavaScript code upon import of the generated zod schema module, leading to code execution in environments where the module is used. The vulnerability has a CVSS 4.0 score of 9.3, indicating critical severity. The issue is resolved in orval version 8.21.0.
Potential Impact
An attacker can inject and execute arbitrary JavaScript code in the context of the developer, continuous integration, testing, or application environment by crafting malicious enum default values that are processed by orval prior to version 8.21.0. This can lead to full code execution without requiring user interaction or privileges, posing a critical risk to the integrity and security of affected environments.
Mitigation Recommendations
This vulnerability is fixed in orval version 8.21.0. Users should upgrade to version 8.21.0 or later to remediate this issue. Since no official patch links or advisories are provided, verify the upgrade through the vendor's official channels. No other mitigations are specified.
CVE-2026-71868: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Description
CVE-2026-71868 is a critical code injection vulnerability in orval-labs' orval tool prior to version 8.21.0. The issue arises from unsafe encoding of ${...} expressions or backticks in enum default values, which are emitted into module-level template literals during zod schema generation. This flaw allows attacker-controlled JavaScript code to be executed when the generated zod schema module is imported, potentially impacting developer, CI, test, or application environments. The vulnerability 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 before 8.21.0, the function formatDefaultValue in packages/zod/src/index.ts emits ${...} expressions or backticks found in enum defaults directly into module-level template literals without safe encoding. This improper control of code generation (CWE-94) permits injection and evaluation of attacker-controlled JavaScript code upon import of the generated zod schema module, leading to code execution in environments where the module is used. The vulnerability has a CVSS 4.0 score of 9.3, indicating critical severity. The issue is resolved in orval version 8.21.0.
Potential Impact
An attacker can inject and execute arbitrary JavaScript code in the context of the developer, continuous integration, testing, or application environment by crafting malicious enum default values that are processed by orval prior to version 8.21.0. This can lead to full code execution without requiring user interaction or privileges, posing a critical risk to the integrity and security of affected environments.
Mitigation Recommendations
This vulnerability is fixed in orval version 8.21.0. Users should upgrade to version 8.21.0 or later to remediate this issue. Since no official patch links or advisories are provided, verify the upgrade through the vendor's official channels. No other mitigations are specified.
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: 6a85eb30acd9273b4966722e
Added to database: 08/19/2026, 17:43:12 UTC
Last enriched: 08/19/2026, 17:53:06 UTC
Last updated: 08/19/2026, 18:49:03 UTC
Views: 5
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.