Orval
CVE-2026-25141
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious OpenAPI specification with JSFuck payload
-
ExploitOrval processes spec during code generation
-
ExecutionIncomplete escaping allows bracket/parenthesis bypass
-
ImpactGenerated TypeScript client executes arbitrary JavaScript
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Orval versions 7.19.0-7.20.x or 8.0.0-8.1.x processing untrusted OpenAPI v3/Swagger v2 specifications containing JSFuck-encoded payloads using unescaped characters: [] () ! + |
| Impact | CVSS 9.8. Supply chain risk — generated code from untrusted API specs could contain backdoors. |
| Exploit ScenarioDerived | Attacker provides malicious OpenAPI spec, Orval generates TypeScript client with injected code that executes in the consuming application. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 12, 2026
Code injection in Orval TypeScript API client generator versions 7.19.0 to before 7.22.0. Generated client code may be vulnerable to injection through crafted OpenAPI specifications.
Earlier versions of this analysis (1)
Code injection via OpenAPI spec processing in Orval.
RemediationAI
Update to Orval 7.22.0+.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-94 in Orval. Malicious OpenAPI v3/Swagger v2 specifications can inject code into generated TypeScript clients.
Know when Orval gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions starting with 7.19.0 and prior to 7.21.0 and 8.2.0 have an incomplete fix for CVE-2026-23947. While the jsStringEscape function properly handles single quotes ('), double quotes (") and so on, it is still possible to achieve code injection using only a limited set of characters that are currently not escaped. The vulnerability lies in the fact that the application can be forced to execute arbitrary JavaScript using characters such as []()!+. By using a technique known as JSFuck, an attacker can bypass the current sanitization logic and run arbitrary code without needing any alphanumeric characters or quotes. Version 7.21.0 and 8.2.0 contain an updated fix.
Executive ViewAI
Orval, a code generation tool used to create TypeScript API clients, contains a critical vulnerability affecting versions 7.19.0-7.20.x and 8.0.x-8.1.x. Organizations using affected versions face potential code injection attacks through malicious OpenAPI specifications, which could compromise generated client applications and downstream systems.
Implement strict input validation and sanitization of all OpenAPI v3 and Swagger v2 specifications before processing through Orval. Enforce code review of all generated TypeScript client code before deployment. Restrict Orval execution to isolated build environments with limited network access. Disable Orval's automatic code generation features where possible and require manual review of specifications. Monitor for upstream security announcements and prepare to upgrade immediately when patch availability is announced. Consider temporarily using alternative API client generation tools if business-critical applications depend on Orval.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Affected Products (CPE)GitHub Advisory
orval (TypeScript API client generator) before 7.18.0 has code injection via OpenAPI specification summary fields in MCP
Arbitrary code execution in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swag
Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 or Swagger v2 specification execute arbitra
Code injection in Orval before 8.21.0 lets an attacker who controls an OpenAPI v3 or Swagger v2 specification embed exec
Arbitrary code execution in Orval before 8.21.0 arises when the code generator emits an unescaped backtick (or ${...}) f
Code injection in Orval, a TypeScript/JavaScript API client generator, allows a malicious OpenAPI v3 or Swagger v2 speci
Code execution in Orval before 8.21.0 occurs when its zod schema generator processes an attacker-controlled OpenAPI v3 o
Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 / Swagger v2 specification achieve arbitrar
Arbitrary code execution in Orval (OpenAPI/Swagger TypeScript client generator) before 8.21.0 lets an attacker who contr
Code injection in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swagger v2 spe
Code injection in Orval, a TypeScript client generator for OpenAPI v3 and Swagger v2 specs, allows arbitrary JavaScript
I analyzed the provided intelligence and produced the synthesis below. One thing to flag first: **⚠️ Prompt-injection n
GHSA-gch2-phqh-fg9q
NVD
CVE.org
EPSS
Exploit-DB