CVE-2026-62682: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, an unescaped backtick in servers[0].url is emitted into request URL template literals generated when output.baseUrl.getBaseUrlFromSpecification is enabled without safe encoding. This permits attacker-controlled JavaScript to be evaluated when a generated request or URL-builder function is called, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/route.ts function getFullRoute. This 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. Before version 8.21.0, an unescaped backtick character in the servers[0].url property is directly inserted into request URL template literals generated by the function getFullRoute in packages/core/src/getters/route.ts when output.baseUrl.getBaseUrlFromSpecification is enabled. This lack of escaping permits injection and evaluation of attacker-controlled JavaScript code during execution of generated request or URL-builder functions, resulting in code execution in the environment where the generated code runs. The vulnerability is classified under CWE-94 (Improper Control of Generation of Code), CWE-116, and CWE-1336. The issue has been fixed in orval version 8.21.0.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript code in the context of the developer, continuous integration, testing, or application environment where the orval-generated client code is used. This can lead to compromise of these environments, unauthorized actions, or further attacks. The CVSS 4.0 score is 9.3 (critical), reflecting network attack vector, no required privileges or user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade orval to version 8.21.0 or later, where this vulnerability is fixed by properly escaping backticks in servers[0].url. No other mitigation or workaround is documented. Patch status is confirmed fixed in 8.21.0.
CVE-2026-62682: CWE-94: Improper Control of Generation of Code ('Code Injection') in orval-labs orval
Description
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, an unescaped backtick in servers[0].url is emitted into request URL template literals generated when output.baseUrl.getBaseUrlFromSpecification is enabled without safe encoding. This permits attacker-controlled JavaScript to be evaluated when a generated request or URL-builder function is called, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/route.ts function getFullRoute. This 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. Before version 8.21.0, an unescaped backtick character in the servers[0].url property is directly inserted into request URL template literals generated by the function getFullRoute in packages/core/src/getters/route.ts when output.baseUrl.getBaseUrlFromSpecification is enabled. This lack of escaping permits injection and evaluation of attacker-controlled JavaScript code during execution of generated request or URL-builder functions, resulting in code execution in the environment where the generated code runs. The vulnerability is classified under CWE-94 (Improper Control of Generation of Code), CWE-116, and CWE-1336. The issue has been fixed in orval version 8.21.0.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript code in the context of the developer, continuous integration, testing, or application environment where the orval-generated client code is used. This can lead to compromise of these environments, unauthorized actions, or further attacks. The CVSS 4.0 score is 9.3 (critical), reflecting network attack vector, no required privileges or user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade orval to version 8.21.0 or later, where this vulnerability is fixed by properly escaping backticks in servers[0].url. No other mitigation or workaround is documented. Patch status is confirmed fixed in 8.21.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-14T20:22:04.395Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a85f0f8acd9273b496dcaee
Added to database: 08/19/2026, 18:07:52 UTC
Last enriched: 08/19/2026, 18:22:21 UTC
Last updated: 08/19/2026, 21:42:57 UTC
Views: 7
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.