Skip to main content

Orval CVE-2026-96756

| EUVDEUVD-2026-85406 CRITICAL
Code Injection (CWE-94)
2026-09-23 VulnCheck GHSA-j4vv-v4c9-8599
9.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft OpenAPI spec with apostrophe in date default
  2. Delivery
    Deliver spec to victim's codegen pipeline
  3. Exploit
    Break out of new Date() string literal
  4. Execution
    Inject arbitrary JS expression into generated factory
  5. Impact
    Execute 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 factoryMethods option enabled AND the useDates option enabled (both non-default); (2) the developer running codegen against an OpenAPI schema the attacker can influence, containing a date or date-time field whose default value carries an unescaped apostrophe/backslash; and (3) the generated factory client being executed. LIMITS: this is a build/developer-time vector, not exploitable against a deployed running service; it needs developer interaction (running the generator and the output) and control of the input spec, so trusted first-party specs are not at risk. Impact is code execution with the privileges of whatever process runs the generated client.

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 default value contains an apostrophe that breaks out of the hand-built single-quoted new Date('...') literal and appends arbitrary JavaScript (e.g. 2024-01-01' + (globalThis.pwned = 1, '') + '). A developer with factoryMethods and useDates enabled runs orval codegen on that spec; the injected expression is spliced into the generated factory and evaluates in the consumer process when the client is run. No public exploit code is identified at time of analysis, though the vendor advisory/PR includes an escape-breakout test case demonstrating the mechanism.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

orval 0 <8.30.0

Affected Packages

euvd orval fix: 8.30.0

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

Vendor (VulnCheck) PRIMARY 9.2 CRITICAL
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
vuln.today AI 8.8 HIGH

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).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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.

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Medium
popular OSS TypeScript OpenAPI client generator, developer-time tool
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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.

More in Orval

View all
CVE-2026-22785 CRITICAL POC
9.8 Jan 12

orval (TypeScript API client generator) before 7.18.0 has code injection via OpenAPI specification summary fields in MCP

CVE-2026-72717 CRITICAL POC
9.3 Aug 19

Arbitrary code execution in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swag

CVE-2026-72716 CRITICAL POC
9.3 Aug 19

Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 or Swagger v2 specification execute arbitra

CVE-2026-62681 CRITICAL POC
9.3 Aug 19

Code injection in Orval before 8.21.0 lets an attacker who controls an OpenAPI v3 or Swagger v2 specification embed exec

CVE-2026-62682 CRITICAL POC
9.3 Aug 19

Arbitrary code execution in Orval before 8.21.0 arises when the code generator emits an unescaped backtick (or ${...}) f

CVE-2026-71867 CRITICAL POC
9.3 Aug 19

Code injection in Orval, a TypeScript/JavaScript API client generator, allows a malicious OpenAPI v3 or Swagger v2 speci

CVE-2026-71868 CRITICAL POC
9.3 Aug 19

Code execution in Orval before 8.21.0 occurs when its zod schema generator processes an attacker-controlled OpenAPI v3 o

CVE-2026-71865 CRITICAL POC
9.3 Aug 19

Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 / Swagger v2 specification achieve arbitrar

CVE-2026-71869 CRITICAL POC
9.3 Aug 19

Arbitrary code execution in Orval (OpenAPI/Swagger TypeScript client generator) before 8.21.0 lets an attacker who contr

CVE-2026-71864 CRITICAL POC
9.3 Aug 19

Code injection in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swagger v2 spe

CVE-2026-71871 CRITICAL POC
9.3 Aug 19

Code injection in Orval, a TypeScript client generator for OpenAPI v3 and Swagger v2 specs, allows arbitrary JavaScript

CVE-2026-71866 CRITICAL POC
9.3 Aug 19

I analyzed the provided intelligence and produced the synthesis below. One thing to flag first: **⚠️ Prompt-injection n

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy