Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft OpenAPI spec with ${...}/backtick in array default
-
DeliveryDeliver spec to victim's Orval pipeline
-
ExploitOrval emits payload into zod template literal
-
ExecutionDeveloper/CI imports generated module
-
PersistJavaScript executes in build/runtime context
-
ImpactCode execution and secret/environment compromise
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 the victim run Orval (< 8.21.0) against an attacker-influenced OpenAPI v3 or Swagger v2 specification AND then import/execute the generated zod schema module - the payload lies dormant until import. The exact trigger is a ${...} expression or a raw backtick placed inside an array item's default value, which formatDefaultValue emits unescaped into a template literal. Limiting factors that reduce real-world risk: the attacker must get their spec into the victim's generation pipeline (malicious/compromised spec source, untrusted third-party API definition, or user-supplied schema), zod schema output must actually be generated and imported, and fully first-party trusted specs are not exposed. There is no authentication requirement on any target service and no memory-corruption complexity - the only real gate is control over the input spec and downstream consumption of the generated code. |
| Impact | The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) scores 9.3 and implies trivial remote unauthenticated exploitation, but the real-world precondition is that a victim runs Orval against an attacker-controlled OpenAPI/Swagger spec and then imports or executes the generated module - this is a supply-chain / malicious-input pattern rather than a directly network-reachable service bug, so the vendor's UI:N is arguably optimistic (a developer or CI pipeline must consume the spec and build/import the output). Technical impact is genuinely high: full code execution with the privileges of the build or runtime process, which in CI often means access to secrets and signing material. No EPSS score and no CISA KEV entry were provided, so there is no evidence of active mass exploitation; however, the fix commit publishes exploit payloads, lowering the barrier to weaponization. Net: prioritize for teams that ingest third-party or user-supplied API specs through Orval; lower urgency where specs are fully first-party and trusted. |
| Exploit ScenarioDerived | An attacker publishes an OpenAPI spec (or compromises one a target consumes) containing an array item default such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 19, 2026
Arbitrary code execution in Orval (OpenAPI/Swagger TypeScript client generator) before 8.21.0 lets an attacker who controls an OpenAPI v3 or Swagger v2 specification inject JavaScript that runs when the generated zod schema module is imported. A ${...} template expression or backtick placed in an array item's default value is emitted verbatim into a module-level template literal by formatDefaultValue in packages/zod/src/index.ts, so importing the generated code executes attacker payloads in the developer, CI, test, or application environment. No CISA KEV listing exists, but the fixing PR (#3692) ships tests demonstrating concrete injection payloads such as backtick-plus-require('child_process').execSync('id'), so working exploit technique is effectively public; EPSS was not provided.
RemediationAI
Vendor-released patch: upgrade Orval to 8.21.0 or later, which escapes untrusted spec-sourced strings via a jsStringLiteralEscape/jsesc helper before emitting them into generated JavaScript (fix commit 8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6, PR https://github.com/orval-labs/orval/pull/3692, advisory https://github.com/orval-labs/orval/security/advisories/GHSA-2h9g-j24r-h63g). If you cannot upgrade immediately, treat every OpenAPI/Swagger spec as untrusted input: only run Orval against specs from sources you fully control, and manually review array item default values, object keys, path segments, and server URLs/variables for backticks or ${...} sequences before generation - the trade-off is manual overhead and no guarantee against obfuscated payloads. As a stronger compensating control, run Orval generation inside a sandboxed/ephemeral CI job with no secrets and no network egress, and inspect or diff the generated modules before any import or execution, since the payload only fires when the generated code is imported. Do not invent or apply unofficial patched version numbers beyond the confirmed 8.21.0.
Affected VersionsENISA
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
Orval is a build-time code generator that turns OpenAPI v3 / Swagger v2 specs into type-safe TypeScript API clients and zod validation schemas. The flaw is a classic CWE-94 code injection: when generating zod schemas, formatDefaultValue serializes an array item's default value into JavaScript source using a template literal (backtick string). Because the value is interpolated without JavaScript string-literal escaping, any ${...} interpolation sequence or raw backtick in the spec breaks out of the intended string and becomes live code in the emitted module. The broader fix (GHSA-88f2-fpv8-89q2 / GHSA-2h9g-j24r-h63g) also hardens related sinks - object keys (getKey), route paths (getRoute), and server URLs/variable defaults (getFullRoute) - by routing untrusted values through a jsStringLiteralEscape helper (the jsesc library). The affected product per CPE is cpe:2.3:a:orval-labs:orval, all versions below 8.21.0.
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 can be remote (AV:N) and payload is simple (AC:L, PR:N), but a developer/CI must consume the spec and import output (UI:R); generated code runs in a different context than the tool (S:C) with full code execution (C/I/A:H).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a ${...} expression or backtick in an array item default is emitted into a module-level template literal emitted by zod schema generation without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated zod schema module is imported, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/zod/src/index.ts function formatDefaultValue. This issue is fixed in version 8.21.0.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
Orval, a TypeScript code generator for OpenAPI specifications, contains a critical vulnerability enabling arbitrary code execution when developers import generated modules. Publicly available exploit code exists; organizations risk silent compromise of their development environments, CI/CD pipelines, and production systems if attackers gain control over API specification files.
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
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
External $ref resolution in Orval prior to version 8.22.0 allows server-side request forgery and path traversal against
EUVD-2026-62603
GHSA-2h9g-j24r-h63g
NVD
CVE.org
EPSS
Exploit-DB