Skip to main content

orval CVE-2026-96757

| EUVDEUVD-2026-85407 CRITICAL
Code Injection (CWE-94)
2026-09-23 VulnCheck GHSA-2hg7-crf6-4xp2
9.3
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 malicious media-type key
  2. Delivery
    Victim runs orval codegen on spec
  3. Exploit
    Injected JS breaks out of Content-Type literal
  4. Execution
    Generated fetch/mock code invoked
  5. Impact
    Arbitrary 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.6% 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 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

orval 6.7.1 <8.29.0

Affected Packages

euvd orval fix: 8.29.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

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

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

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.

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:N/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
None
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 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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 55% exploitable
Prevalence
Medium
popular open-source TS/JS OpenAPI client generator in the npm ecosystem
Social Media
1
Sightings
Data Quality
4 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.6%
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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
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