Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft OpenAPI spec with malicious media-type key
-
DeliveryVictim runs orval codegen on spec
-
ExploitInjected JS breaks out of Content-Type literal
-
ExecutionGenerated fetch/mock code invoked
-
ImpactArbitrary JavaScript executes in consumer process
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 victim run orval (any version before 8.29.0) to generate code from an OpenAPI specification that the attacker can influence - the specific trigger is an OpenAPI media-type (Content-Type) key containing statement-breaking punctuation that escapes the single-quoted string literal orval emits. The injected code only executes when the generated fetch operations or mock resolvers are actually invoked, so a developer/CI codegen step plus subsequent execution of the generated output is mandatory. Limiting factors: this is a build-time/dev-toolchain flaw, not a live network service - teams that only generate clients from their own trusted specs are not realistically exposed; exposure is confined to consumers of untrusted or third-party OpenAPI specifications. |
| Impact | The vendor/VulnCheck CVSS 4.0 score is 9.3 (AV:N/AC:L/PR:N/UI:N/VC:H/VI:H/VA:H), which frames this as a critical, remote, unauthenticated code-injection flaw. That framing is misleading for real-world prioritization: orval is a build-time TypeScript/JavaScript code generator, not a running network service. Exploitation requires an attacker-controlled OpenAPI specification to be fed into orval codegen by a victim developer, and the injected JavaScript only fires when the resulting generated fetch operations or mock resolvers are later invoked - a developer/CI action, not a spontaneous remote hit. The UI:N in the vendor vector therefore looks optimistic; a required developer codegen step argues for UI:P (4.0) / UI:R (3.1). No EPSS score, no CISA KEV listing, and no packaged weaponized exploit are provided, so there is no evidence of widespread automated exploitation. However, the fix PR (#4007) embeds concrete breakout payloads (e.g. "application/x-evil; q=1) { globalThis['pwned'] = 'yes'; } function unused("), which effectively serve as public proof-of-concept injection strings. Net assessment: genuinely serious as a supply-chain / dev-toolchain integrity issue for anyone generating clients from untrusted or third-party OpenAPI specs, but the 9.3 overstates risk for the common case where teams only run orval against their own trusted specs. Priority is high for consumers of untrusted specs, moderate otherwise. |
| Exploit ScenarioDerived | An attacker publishes or supplies a crafted OpenAPI specification containing a malicious media-type key whose punctuation breaks out of the single-quoted Content-Type string literal orval emits. A developer runs orval (before 8.29.0) to generate a client/mock from that spec, and the injected JavaScript executes when the generated fetch operations or mock resolvers run - in CI, a dev machine, or the shipped app. The security advisory and fix PR contain working breakout payloads that act as a proof of concept. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
Code injection in orval before 8.29.0 lets an attacker who controls or influences the OpenAPI specification being processed smuggle executable JavaScript into the generated client: media-type (Content-Type) keys are written into single-quoted string literals without escaping, so punctuation in a crafted key terminates the literal and injects arbitrary statements into the emitted code. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H) makes this an unauthenticated remote code-injection flaw at 9.3, but exploitation in practice is gated by the victim actually running orval over the malicious spec and then invoking the generated fetch operation or mock resolver - our independent assessment therefore applies UI:R (CVSS 3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H), and teams that only generate clients from their own trusted specifications are not realistically exposed. No public exploit code or confirmed active exploitation has been identified at time of analysis, and the vendor has released a fix in orval 8.29.0.
RemediationAI
Upgrade to orval 8.29.0 or later - vendor-released patch: 8.29.0 - which sanitizes media-type-derived suffixes, substitutes the Content fallback when no identifier-safe characters remain, and de-duplicates colliding suffixes; the underlying changes are in PR 4007 and commits 43af282d62dca0ef3140023741fb768f6a718adb and a2d4af59f3b167dc8a7a65d15f51cdb89ebe2fe5 (https://github.com/orval-labs/orval/pull/4007, references also at https://github.com/orval-labs/orval/blob/v8.28.1/packages/fetch/src/index.ts#L584). Review the advisories at https://github.com/orval-labs/orval/security/advisories/GHSA-4q3x-rqfw-3x8p and https://github.com/orval-labs/orval/security/advisories/GHSA-rcpr-mq4m-jx9j for the maintained fix line. If immediate upgrade is not possible, treat every OpenAPI specification as untrusted input before codegen: validate or normalize media-type keys and reject/quarantine any key containing quotes, parentheses, semicolons, backslashes, or whitespace outside the RFC 6838 type/subtype; parameter grammar, since such keys are the direct trigger (trade-off: some legitimate but unusual vendor media types may be rejected and need manual renaming). Generate code only from specifications you own or have reviewed, and regenerate rather than trusting a cached generated client whose spec provenance is unknown (trade-off: adds a review step to CI and can slow spec ingestion from partners). Because the injected statements only execute when the generated fetch operations or mock resolvers run, gate that execution: run codegen and any mock-resolver startup in a sandboxed, credential-free CI job or container with no access to production secrets, and inspect the generated diff before invoking it (trade-off: sandboxing breaks workflows that rely on codegen-time environment variables or network access). Developers whose pipelines only consume first-party specs can treat this as lower priority, but the upgrade is cheap and removes the class of injection entirely.
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 (orval-labs/orval) is a TypeScript/Node.js code generator that turns OpenAPI/Swagger specifications into typed HTTP clients, mock servers, and related artifacts. While walking the content map of OpenAPI request/response body objects, orval derives a Content-Type string literal and an identifier suffix from each media-type key (for example application/json becomes the literal 'application/json' plus a suffix such as Json). The vulnerable logic in the body getter emitted those keys verbatim into single-quoted literals in the generated source and concatenated the derived suffixes directly into generated identifiers, without escaping or character filtering. A media-type key that carries statement-breaking punctuation - the vendor regression tests use values such as application/x-evil; q=1) { globalThis['pwned'] = 'yes'; } function unused( and purely punctuation subtypes like application/''' - can therefore close the string literal or identifier and append attacker-chosen statements. This is a classic CWE-94 code-injection through unsanitized data flowing into generated source, conceptually the same class as template/deserialization injection: the tool treats a semi-trusted data field (spec metadata) as trusted code. The fix (PR 4007, commits 43af282d62dca0ef3140023741fb768f6a718adb and a2d4af59f3b167dc8a7a65d15f51cdb89ebe2fe5) strips non-identifier characters from derived suffixes, preserves only legal characters such as $, falls back to the constant suffix Content when nothing identifier-safe remains, and adds deterministic numbering (AB, AB2, …) so distinct media types cannot collide into duplicate declarations; note the code path also appears in the fetch package (packages/fetch/src/index.ts, referenced at line 584 of v8.28.1), consistent with the injection surfacing in generated fetch operations and mock resolvers.
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
Attacker-supplied spec is remote (AV:N) and simple (AC:L, PR:N), but a developer must run codegen and execute the generated output, so UI:R; injected JS yields full C/I/A.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
orval before 8.29.0 fails to escape OpenAPI media-type keys when emitting them into single-quoted Content-Type string literals in generated code. Attackers can inject JavaScript through crafted media-type keys in OpenAPI specifications that executes when generated fetch operations or mock resolvers are invoked.
Technical POC Analysis
CWE-94: Improper Control of Generation of Code.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Orval versions prior to 8.29.0 contain a critical code injection vulnerability that can allow an attacker controlling an OpenAPI specification to inject malicious JavaScript into generated client code, potentially compromising developer workstations or build pipelines. This affects teams that process untrusted or third-party API specifications, but organizations generating clients only from trusted internal specs are not realistically exposed. No public exploit identified at time of analysis, and Vendor-released patch: 8.29.0 is available; however, because exploitation requires user interaction to run orval and invoke the generated code, leadership should prioritize upgrading and restricting spec sources.
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-85407
GHSA-2hg7-crf6-4xp2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB