CVE-2026-71864: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Orval versions prior to 8.21.0 contain a code injection vulnerability where a double quote in a header parameter name is not safely encoded in the generated request-validation schema. This allows attacker-controlled JavaScript code to be executed when the generated schema module is imported. 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 before 8.21.0, a double quote character in a header parameter name is directly emitted into the generated zod.object schema without proper encoding. This unsafe handling permits attacker-controlled JavaScript code to be evaluated during module import, leading to code execution in developer, CI, test, or application environments. The vulnerability affects the code in packages/zod/src/index.ts related to header request-validation generation. The vulnerability is identified as CWE-94 (Improper Control of Generation of Code) and is fixed in version 8.21.0.
Potential Impact
Successful exploitation results in remote code execution without authentication in environments where the generated zod schema module is imported. This can compromise developer machines, continuous integration pipelines, testing environments, or applications using the vulnerable Orval-generated code. The CVSS 4.0 base score is 9.3 (critical), reflecting network attack vector, no privileges required, no user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade Orval to version 8.21.0 or later, where this code injection vulnerability is fixed by properly encoding double quotes in header parameter names during schema generation. No other mitigation is documented. Patch status is not explicitly stated in the vendor advisory, but the description confirms the issue is fixed in 8.21.0.
CVE-2026-71864: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Description
Orval versions prior to 8.21.0 contain a code injection vulnerability where a double quote in a header parameter name is not safely encoded in the generated request-validation schema. This allows attacker-controlled JavaScript code to be executed when the generated schema module is imported. 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 before 8.21.0, a double quote character in a header parameter name is directly emitted into the generated zod.object schema without proper encoding. This unsafe handling permits attacker-controlled JavaScript code to be evaluated during module import, leading to code execution in developer, CI, test, or application environments. The vulnerability affects the code in packages/zod/src/index.ts related to header request-validation generation. The vulnerability is identified as CWE-94 (Improper Control of Generation of Code) and is fixed in version 8.21.0.
Potential Impact
Successful exploitation results in remote code execution without authentication in environments where the generated zod schema module is imported. This can compromise developer machines, continuous integration pipelines, testing environments, or applications using the vulnerable Orval-generated code. The CVSS 4.0 base score is 9.3 (critical), reflecting network attack vector, no privileges required, no user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade Orval to version 8.21.0 or later, where this code injection vulnerability is fixed by properly encoding double quotes in header parameter names during schema generation. No other mitigation is documented. Patch status is not explicitly stated in the vendor advisory, but the description confirms the issue is fixed in 8.21.0.
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: 6a85eb30acd9273b49667226
Added to database: 08/19/2026, 17:43:12 UTC
Last enriched: 08/19/2026, 17:53:57 UTC
Last updated: 08/19/2026, 20:55:56 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.