CVE-2026-71871: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Description
CVE-2026-71871 is a critical code injection vulnerability in orval-labs' orval tool that generates type-safe JavaScript clients from OpenAPI and Swagger specifications. Versions prior to 8.21.0 improperly handle default header parameter values containing ${...} expressions or backticks, embedding attacker-controlled JavaScript into generated zod schema modules. This leads to arbitrary code execution when the 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
orval-labs
orval
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Orval versions before 8.21.0 contain a code injection vulnerability (CWE-94) due to unsafe encoding of ${...} expressions or backticks in header parameter defaults. These unsafe values are emitted into module-level template literals during zod schema generation, specifically in the function formatDefaultValue in packages/zod/src/index.ts. When the generated zod schema module is imported, the injected JavaScript code executes, allowing an attacker to run arbitrary code 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 execute arbitrary JavaScript code in the developer, continuous integration, testing, or application environment by injecting malicious code into header parameter defaults. This can lead to full code execution without requiring user interaction or privileges, posing a critical security risk.
Mitigation Recommendations
Upgrade orval to version 8.21.0 or later, where this vulnerability is fixed. No other mitigation is required as the fix addresses the unsafe code generation directly.
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
Threat ID: 6a85eb31acd9273b49667250
Added to database: 08/19/2026, 17:43:13 UTC
Last enriched: 09/11/2026, 07:17:29 UTC
Last updated: 10/04/2026, 10:02:29 UTC
Views: 67
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.