Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft OpenAPI spec with apostrophe in date default
-
DeliveryDeliver spec to victim's codegen pipeline
-
ExploitBreak out of new Date() string literal
-
ExecutionInject arbitrary JS expression into generated factory
-
ImpactExecute code as consumer process on codegen/run
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 all of: (1) the orval |
| Impact | This is a CWE-94 code injection in the @orval/core factory generator (orval <8.30.0), a developer-time TypeScript OpenAPI client generator. The published CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H, 9.2) reads like a remote, no-interaction critical, but that overstates real-world risk: this is a dev-toolchain/supply-chain flaw, not a running-service RCE. Exploitation requires a developer to (a) enable the non-default factoryMethods and useDates options, (b) run codegen against an attacker-influenced OpenAPI specification, and (c) execute the generated client. The AT:P (attack requirement) partly captures the non-default gating, but UI:N is questionable - a human developer must run the generator and the emitted code, so UI:R (4.0 UI:P) is more honest; my independent estimate is ~8.8 rather than 9.2. On the exploitation-signal side there is no EPSS score, no CISA KEV listing, and no public POC identified at time of analysis; a patch is confirmed available. Net: a genuinely serious defect for anyone generating clients from untrusted/third-party specs, but not a mass-exploitable internet-facing vulnerability - priority should be scoped to teams whose build pipelines consume external OpenAPI documents with these options on. |
| Exploit ScenarioDerived | An attacker publishes or supplies a malicious OpenAPI schema in which a date/date-time field's |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
Code injection in the Orval OpenAPI-to-TypeScript client generator (@orval/core) before 8.30.0 lets an attacker who controls the default value of a date or date-time field in an OpenAPI schema splice arbitrary JavaScript into generated factory code, which then executes with the privileges of whatever process consumes the generated client. Exploitation is not remote against a deployed service: it requires the non-default factoryMethods and useDates options to be enabled, a developer running codegen against a spec the attacker can influence, and the resulting factory client being executed, giving an assessed CVSS 3.1 vector of AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (the advisory lists 9.2 under CVSS 4.0). No public exploit identified at time of analysis and no confirmed active exploitation (CISA KEV); the vendor has shipped a fix in 8.30.0.
RemediationAI
Upgrade to Orval 8.30.0 or later, the first release outside the affected range; the fix adds jsStringLiteralEscape for date defaults and is delivered via PR #4038 (https://github.com/orval-labs/orval/pull/4038) and commit b9b0835 (https://github.com/orval-labs/orval/commit/b9b083576943c683540200eb957feced57dddc1a), with the advisory at https://github.com/orval-labs/orval/security/advisories/GHSA-wx66-36r6-v5g7. If an immediate upgrade is not possible, disable factoryMethods and/or useDates in the orval config, since either change removes the vulnerable code path and halts generation of factory-style clients or Date objects (side effect: downstream code that relies on those generated artifacts must be adjusted). Restrict codegen to trusted, reviewed OpenAPI specs, or pre-sanitize date and date-time default values by escaping or stripping apostrophes and backslashes before generation (side effect: generated default literals may differ from the original document). Run codegen in a sandboxed, low-privilege CI container, because any injected expression executes with the privileges of the generator or consumer process, and inspect generated factory output for unexpected expressions inside new Date(...) arguments.
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
The root cause is CWE-94 (improper control of generation of code) in the @orval/core factory generator. At packages/core/src/generators/factory.ts (line 493 in v8.29.0), the generator built a JavaScript date literal by hand with string concatenation, effectively emitting new Date('<schema.default>'), without escaping the OpenAPI schema's default text before embedding it in a single-quoted string literal. Because an OpenAPI document is attacker-influenceable input, an attacker can place an apostrophe or trailing backslash in a date/date-time default so it closes or escapes the literal and appends an expression to the new Date(...) argument - for example a default of 2024-01-01' + (globalThis.pwned = 1, '') + ' becomes executable code that the generated factory evaluates on every call. The vulnerable path is gated behind the non-default factoryMethods and useDates options, so it is a developer/build-time vector rather than a flaw in a running server. The fix introduces a jsStringLiteralEscape helper and applies it to date defaults, with regression tests covering both apostrophe break-out and trailing-backslash escaping. The CPE string cpe:2.3:a:orval-labs:orval:*:*:*:*:*:*:*:* reflects that the entire orval package line before the fixed release is affected.
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:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Attacker supplies a malicious spec (PR:N) but a developer must enable non-default options and run codegen/output (UI:R); resulting arbitrary code exec gives full C/I/A in the consumer process (S:U).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
orval versions before 8.30.0 contain a code injection vulnerability in the @orval/core factory generator that fails to escape date default values in new Date() calls. Attackers can inject arbitrary expressions through apostrophes in OpenAPI schema defaults to execute code with the privileges of the consumer process when factoryMethods and useDates options are enabled.
Articles & Coverage 1
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, the OpenAPI-to-TypeScript client generator widely used to automate API client creation, contains a critical code injection flaw in @orval/core versions prior to 8.30.0 that can cause attacker-supplied JavaScript to execute wherever the generated client is run. Because the payload is embedded in a generated source file, the exposure is concentrated in developer workstations and CI/CD build pipelines rather than a customer-facing service, putting source code, build credentials, and downstream deployment infrastructure at risk. No public exploit code or confirmed active exploitation has been identified (confirmed actively exploited status: no; no public exploit identified at time of analysis), and the vendor has shipped a fix, so this is a remediation-driven issue rather than an active incident.
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-85406
GHSA-j4vv-v4c9-8599
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB