Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious OpenAPI spec with apostrophe in path
-
DeliveryVictim runs @orval/hono codegen on spec
-
ExploitUnescaped path breaks out of single-quoted literal
-
ExecutionInjected JS emitted into generated TS module
-
PersistCode executes on import/build
-
ImpactArbitrary execution in dev/CI context
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 build pipeline use orval's @orval/hono generator (an opt-in output client) and run code generation against an attacker-influenced OpenAPI document containing an apostrophe or single-quote-breakout payload in a static path segment. Injected code executes only when the generated TypeScript module is subsequently imported or built. Limiting factors: the target must consume an UNTRUSTED OpenAPI spec (self-authored specs are not exploitable), must be on a version before 8.29.0, and must use the Hono generator specifically; there is inherent developer/build-step interaction, so this is not exploitable against a running network service. |
| Impact | This is a build-time code-injection flaw (CWE-94) in orval's @orval/hono generator, not a runtime flaw in a network service. The vendor/VulnCheck CVSS 4.0 vector (9.3, AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) treats it as remote-unauthenticated with no user interaction, but that overstates real-world risk: exploitation actually requires a victim developer to run orval codegen against an attacker-controlled OpenAPI document and then import/build the generated TypeScript module. That is a supply-chain / untrusted-input-processing scenario with de facto user interaction, so the UI:N assignment is questionable - a UI:R rating (my assessed ~8.8 CVSS 3.1) better reflects it. There is NO EPSS score, NO CISA KEV listing, and no public exploit; status is 'no public exploit identified at time of analysis' (the PR contains an injection-payload regression test, which demonstrates the class but is not a weaponized exploit). Net: technically high impact (arbitrary JS execution in the developer/CI build context) but low likelihood of widespread opportunistic exploitation because it depends on ingesting a malicious spec. Priority is real for teams that generate clients from third-party/untrusted OpenAPI documents; lower for teams generating only from their own trusted specs. The 9.3 score is high-CVSS-but-conditional-real-risk. |
| Exploit ScenarioDerived | An attacker publishes or supplies a malicious OpenAPI document containing an apostrophe or a payload like "/api/v1/'; type Injected = any //" in a static path segment. A developer or CI pipeline runs orval's Hono generator against that spec, which emits the path unescaped inside a single-quoted route/context literal, breaking out of the string and injecting attacker JavaScript. The injected code executes when the generated TypeScript module is imported/built, running arbitrary code in the developer's or CI environment. No public weaponized exploit exists, though the fix PR includes a proof-style injection test case. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
Code injection in orval's opt-in @orval/hono generator (all versions before 8.29.0) lets an attacker who controls an OpenAPI document plant an apostrophe in a static path segment and break out of the single-quoted route literal, injecting arbitrary JavaScript that runs whenever the generated TypeScript module is imported or built. This is a build-time supply-chain style flaw rather than a runtime flaw in a network service: the affected party must run orval code generation against an untrusted spec and then import the generated output, and the CVSS v4.0 score of 9.3 reflects high confidentiality, integrity and availability impact on the build/developer environment. Exploitation is not confirmed in the wild (no CISA KEV entry) and no public exploit code was identified at time of analysis, though the upstream patch and the exact vulnerable code path are publicly documented.
RemediationAI
Vendor-released patch: orval 8.29.0 - upgrade the orval dependency (and any pinned invocation such as npx orval) to 8.29.0 or later; the fix is delivered through PR https://github.com/orval-labs/orval/pull/4006 with commits 155a5b7a38ff6886020cbc4c292db57c2793e6b6 and d346d94a660e50a2f8d0f7c17fee2c4c69d8dc23, and is described in advisory https://github.com/orval-labs/orval/security/advisories/GHSA-g4mf-q5hw-f9j9. Until upgrading, the most effective compensating control is to stop generating from any OpenAPI document you do not fully trust: treat third-party or partner-supplied specs as untrusted input and either vendor and review them, or pre-validate/reject specs whose path templates contain single quotes or backslashes in static segments (this can break legitimate paths that genuinely contain an apostrophe, so the filter must be reviewed against your API surface). Because the Hono generator is an opt-in output client, environments that do not need Hono clients can simply omit that target or generate with an unaffected client; note this changes generated artifacts and may require route-handler rewrites. Run code generation inside an isolated CI job or container with no production credentials, secrets, or publish scopes, and diff/inspect generated TypeScript before it is imported or built - the trade-off is extra CI time and process overhead. Also re-run generation after upgrading if any previously generated module was produced from an untrusted spec, since the injected code would already be committed into the generated file; audit generated output and source control history for suspicious route literals or unexpected type declarations.
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 TypeScript OpenAPI-to-client code generator; the @orval/hono generator emits typed Hono route handlers from an OpenAPI document. Root cause is CWE-94 (improper control of generation of code / code injection). The generator's getRoute helper rewrites OpenAPI {param} placeholders into :param style routes and sanitizes the captured parameter names, but the literal static path text is passed through unchanged and then interpolated directly into single-quoted TypeScript source - both into a Context<E, '/path'> type literal and into the generated .get('/path', ...) route registration in packages/hono/src/index.ts (see the v8.28.1 source, lines ~169-175 and ~762-775). A single quote in the spec path therefore closes the string literal and the remainder is parsed as code; the fix adds a jsStringLiteralEscape() helper and applies it at the emit site. The same escaping bug existed in the MSW mock generator's route getter (packages/mock/src/faker/getters/route.ts), where the base URL and route text were spliced into a source fragment, so the patch also escapes baseUrl and route with jsStringLiteralEscape before the intentional \: colon escape is applied. The affected CPE is cpe:2.3:a:orval-labs:orval:*:*:*:*:*:*:*:* (all versions up to the fix), and the vulnerable component is specifically the Hono output client, which is opt-in.
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
Untrusted OpenAPI spec is fetched over network (AV:N, PR:N) but a developer must run codegen and import output (UI:R); arbitrary JS execution in the build context yields full C/I/A within one authority scope (S:U).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
orval versions before 8.29.0 contain a code injection vulnerability in the @orval/hono generator that fails to escape OpenAPI path values in single-quoted route literals. Attackers can craft an OpenAPI document with an apostrophe in a static path segment to inject arbitrary JavaScript code that executes when the generated TypeScript module is imported.
Technical POC Analysis
This is 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's opt-in @orval/hono code generator (all versions before 8.29.0) contains a critical build-time code injection flaw that lets an attacker who controls an OpenAPI document plant arbitrary JavaScript into the generated TypeScript module, which then executes on developer workstations and CI/CD build systems whenever that output is imported or compiled. Because the exposure sits in the software supply chain rather than in a customer-facing service, the risk is concentrated in engineering environments that hold source code, credentials, and release pipeline privileges, with the potential for downstream contamination of shipped artifacts. Leadership should care because a single untrusted specification passing through this toolchain can give an attacker a persistent foothold in the build process that runtime security controls are not positioned to detect.
Apply vendor patch (orval 8.29.0 or later). Until the upgrade is fully deployed, remove or disable the @orval/hono generator, generate code only from internally authored and reviewed OpenAPI documents, run code generation in an isolated build environment with least-privilege credentials, and inspect or diff generated TypeScript before it is imported or built. Exploitation status: no public exploit identified at time of analysis; no confirmed actively exploited (CISA KEV) activity.
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-85404
GHSA-4p56-cvjx-38fv
NVD
CVE.org
EPSS
Exploit-DB