Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessHost crafted OpenAPI spec
-
DeliveryVictim runs orval codegen on spec
-
ExploitoperationId breaks out of object literal
-
ExecutionInjected JS emitted into generated hooks
-
ImpactHook invocation executes attacker code
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 | Exploitation requires that a developer or automated pipeline runs orval (before 8.29.0) code generation against an OpenAPI specification whose operationId field is attacker-controlled, and then the generated TanStack Query/mutation hooks must actually be called for the injected JavaScript to execute. The specific sinks are the query-generator and mutation-generator emitting the raw operationId into a single-quoted object literal in the generated mutator options metadata; operationName is sanitized upstream but operationId is not. The key LIMITING factor is the trust boundary: the OpenAPI document must come from an untrusted source (e.g. a third-party or attacker-hosted spec consumed by a build), which is not the typical case of generating from a first-party spec - so despite PR:N in the vector, practical exploitation depends on the victim ingesting an untrusted spec and running codegen plus executing the output. |
| Impact | The headline CVSS 4.0 score is 9.3 (VC:H/VI:H/VA:H, AV:N/PR:N/UI:N), which frames this as critical unauthenticated remote code execution, but that framing is misleading for how the flaw actually triggers. This is a build-time / developer-tooling code-injection: orval only emits the malicious code if a developer runs generation against an attacker-supplied OpenAPI document, and the injected JavaScript executes only when the generated TanStack Query hooks are later called. That is effectively a user-interaction and trust-boundary dependency the CVSS 4.0 vector does not reflect (it sets UI:N), so the real-world attack surface is narrower than a 9.3 suggests. No EPSS score, no CISA KEV listing, and no SSVC decision data were provided, and no standalone public exploit is referenced - the closest artifact is the vendor's own regression test in PR #4008, which demonstrates the injection mechanism (an operationId payload that closes the string literal and runs an IIFE) but is a fix-verification test, not weaponized exploit code. CWE-94 and the source evidence (query-generator.ts / mutation-generator.ts emitting operationId into an unescaped single-quoted object literal) are well-corroborated and consistent with the description. Net: genuinely dangerous where untrusted OpenAPI specs are consumed by an automated pipeline, but for the common case of developers generating from their own trusted specs the practical priority is moderate, not the emergency a raw 9.3 implies. |
| Exploit ScenarioDerived | An attacker publishes or serves a crafted OpenAPI specification whose operationId contains a string-literal breakout such as "getPets',x:(()=>{throw new Error('pwned')})(),y:'". A developer runs orval (<8.29.0) against that spec to generate TanStack Query hooks; the unescaped operationId closes the emitted object literal and injects arbitrary JavaScript, which executes as soon as the generated query/mutation hook is invoked. The vendor patch includes a VM-based test proving the breakout, but no independent public exploit is cited. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
Code generation in orval before 8.29.0 writes the raw OpenAPI operationId into a single-quoted object literal inside generated TanStack Query mutator metadata, so a crafted operationId can break out of the string and inject arbitrary JavaScript that executes when the generated query or mutation hooks are called. Practical exploitation requires a developer or CI pipeline to run orval codegen against an OpenAPI document whose operationId is attacker-controlled and then to execute the generated hooks - a conditional path that hinges on the trust boundary of the ingested spec, even though PR:N appears in the vector; the independent assessment (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) reflects this required victim interaction, while the headline CVSS 4.0 score of 9.3 (UI:N) overstates how freely the flaw triggers. No public exploit code and no CISA KEV entry were identified at time of analysis, and no EPSS score was provided; a vendor patch is available (orval 8.29.0).
RemediationAI
Vendor-released patch: upgrade orval to 8.29.0 or later, which applies jsStringLiteralEscape to both operationId and operationName via the new getOperationMetaLiteral() helper in packages/query/src/utils.ts (fix landed in PR https://github.com/orval-labs/orval/pull/4008 and commit b28c53f3e0c06190e0f6ea136737e6316432448f); see the advisory at https://github.com/orval-labs/orval/security/advisories/GHSA-vv88-cm6j-665j and the VulnCheck advisory at https://www.vulncheck.com/advisories/orval-before-8.29.0-code-injection-via-operationid. After upgrading, regenerate all clients and inspect the diff for any operationId metadata that previously contained quotes or backslashes, since pre-existing generated code stays vulnerable until rebuilt. If upgrading is not immediately possible, treat OpenAPI specifications as untrusted code: add a CI spec-linting gate that rejects or rewrites operationId values containing single quotes, backslashes or other string-terminator characters before codegen (trade-off: legitimate specs with unusual operationId conventions may need manual normalization), run orval in a sandboxed build job with no injected secrets and no network reachability so any payload that does reach generated output cannot easily exfiltrate or fetch stages (trade-off: slower, more constrained pipelines and possible friction for specs fetched over the network at build time), pin and audit the orval version used by every template and monorepo package so a shared generator cannot silently downgrade, and review generated hook files before they are committed or executed. Note that escaping or rejecting the character set in the spec is a compensating control, not a substitute for the 8.29.0 fix, and none of these mitigations preserve the vulnerable behavior.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
orval is a Node.js/TypeScript code generator that consumes an OpenAPI specification and emits typed API clients plus TanStack Query (React Query) hooks, queryOptions and mutationOptions wrappers. This is a classic CWE-94 code injection through a code generator: instead of executing untrusted input directly, the tool interpolates untrusted spec values into the source files it produces, so the generated code becomes the payload carrier. The vulnerable sinks are in packages/query/src/query-generator.ts and packages/query/src/mutation-generator.ts, which build metadata objects such as , { url: \${route}\, operationId: '${operationId}', operationName: '${operationName}' } using simple single-quoted string interpolation; operationName is passed through an upstream sanitize step, but operationId is taken raw from the OpenAPI document. A quote (or trailing backslash) in operationId closes the literal early, allowing additional object keys and arbitrary JavaScript expressions - for example an immediately-invoked function - to be appended and evaluated whenever the generated hook runs. The fix (PR #4008, commit b28c53f3e0c06190e0f6ea136737e6316432448f) introduces getOperationMetaLiteral() in packages/query/src/utils.ts, which applies jsStringLiteralEscape to both operationId and operationName; upstream tests use node:vm to evaluate the emitted fragment and confirm that quote and backslash payloads stay contained inside the string. The affected component is identified by CPE cpe:2.3:a:orval-labs:orval:*:*:*:*:*:*:*:*.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Spec is network-deliverable (AV:N) with no auth (PR:N), but a developer must run codegen on the untrusted spec and execute the generated hooks, so UI:R; injected JS yields full C/I/A in the dev/build context.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
orval before 8.29.0 fails to escape the operationId parameter when emitting it into generated TanStack Query mutator options metadata objects. Attackers can inject arbitrary JavaScript code through a crafted operationId in an OpenAPI specification that executes when generated hooks are called.
Technical POC Analysis
CWE-94 code injection in orval's query/mutation generator.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Orval, an open-source code generator for TanStack Query clients, has a critical code-injection issue in versions before 8.29.0 that can put developer workstations and CI/CD pipelines at risk when they process untrusted OpenAPI specifications. The practical attack path requires a developer or automated pipeline to run codegen on an attacker-influenced spec and then execute the generated hooks, so the primary exposure is software supply-chain and third-party API trust rather than broad public exploitation; no public exploit identified at time of analysis. Leadership should prioritize upgrading affected build environments to 8.29.0 because a compromise could enable unauthorized code execution within development and build environments and undermine trust in generated software artifacts.
Apply vendor patch.
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.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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
EUVD-2026-85409
GHSA-vg3c-9fm6-r5pj
NVD
CVE.org
EPSS
Exploit-DB