CVE-2026-72717: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
CVE-2026-72717 is a critical code injection vulnerability in orval-labs' orval tool prior to version 8.21.0. The issue arises because attacker-controlled JavaScript expressions in schema defaults are emitted without safe encoding into module-level template literals during zod schema generation. This can lead to arbitrary code execution when the generated module is imported in developer, CI, test, or application environments. The vulnerability is fixed in version 8.21.0.
AI Analysis
Technical Summary
Orval generates type-safe JavaScript clients from OpenAPI and Swagger specifications. Before version 8.21.0, the function formatDefaultValue in packages/zod/src/index.ts improperly handles ${...} expressions or backticks in schema defaults by embedding them directly into module-level template literals without safe encoding. This flaw allows attacker-controlled JavaScript code to be executed upon importing the generated zod schema module, resulting in code execution in various environments such as development, continuous integration, testing, or runtime application contexts. The vulnerability is classified as CWE-94 (Improper Control of Generation of Code) and related CWEs. It is fixed in version 8.21.0.
Potential Impact
An attacker who can influence schema defaults can inject arbitrary JavaScript code that will be executed when the generated zod schema module is imported. This leads to remote code execution in the developer, CI, test, or application environment, potentially compromising the affected systems. The vulnerability has a CVSS 4.0 score of 9.3 (critical), reflecting its high impact and ease of exploitation without privileges or user interaction.
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. No other official remediation or temporary fixes are documented. Until upgrading, avoid importing generated modules from untrusted or attacker-controlled schema defaults.
CVE-2026-72717: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Description
CVE-2026-72717 is a critical code injection vulnerability in orval-labs' orval tool prior to version 8.21.0. The issue arises because attacker-controlled JavaScript expressions in schema defaults are emitted without safe encoding into module-level template literals during zod schema generation. This can lead to arbitrary code execution when the generated module is imported in 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 generates type-safe JavaScript clients from OpenAPI and Swagger specifications. Before version 8.21.0, the function formatDefaultValue in packages/zod/src/index.ts improperly handles ${...} expressions or backticks in schema defaults by embedding them directly into module-level template literals without safe encoding. This flaw allows attacker-controlled JavaScript code to be executed upon importing the generated zod schema module, resulting in code execution in various environments such as development, continuous integration, testing, or runtime application contexts. The vulnerability is classified as CWE-94 (Improper Control of Generation of Code) and related CWEs. It is fixed in version 8.21.0.
Potential Impact
An attacker who can influence schema defaults can inject arbitrary JavaScript code that will be executed when the generated zod schema module is imported. This leads to remote code execution in the developer, CI, test, or application environment, potentially compromising the affected systems. The vulnerability has a CVSS 4.0 score of 9.3 (critical), reflecting its high impact and ease of exploitation without privileges or user interaction.
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. No other official remediation or temporary fixes are documented. Until upgrading, avoid importing generated modules from untrusted or attacker-controlled schema defaults.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-10T13:48:09.545Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a85f0f8acd9273b496dcaf0
Added to database: 08/19/2026, 18:07:52 UTC
Last enriched: 08/19/2026, 18:22:13 UTC
Last updated: 08/19/2026, 21:44:54 UTC
Views: 9
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.