Skip to main content

Orval CVE-2026-71868

| EUVDEUVD-2026-62605 CRITICAL
Code Injection (CWE-94)
2026-08-19 GitHub_M GHSA-3575-w9fc-c2j6
9.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft OpenAPI spec with ${...}/backtick enum default
  2. Delivery
    Deliver malicious spec to victim's codegen source
  3. Exploit
    Victim runs Orval zod generation
  4. Execution
    Unescaped payload emitted into template literal
  5. Persist
    Generated module imported in dev/CI
  6. Impact
    Arbitrary JavaScript executes in environment

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 (1) the victim to use Orval's zod schema generation target, (2) an OpenAPI v3 or Swagger v2 specification under attacker influence that contains an enum default value with a backtick or ${...} expression, and (3) the generated zod schema module to be imported/loaded, which is when the injected code runs. Limiting factors that reduce real-world risk: the attacker must control or tamper with the input spec (fully trusted first-party specs are not exploitable), the vulnerable code path is specific to the zod generator rather than all Orval targets, and code execution only fires once the generated module is actually imported or built. Despite the vendor's UI:N rating, in practice a developer or CI job must actively run codegen against the malicious spec.

Impact

The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) yields 9.3 and implies trivially remote, unauthenticated, high-impact exploitation, but the practical trigger is more constrained than that reads: an attacker must control the OpenAPI/Swagger specification fed to Orval, the victim must run zod generation against it, and the generated module must be imported. That said, those conditions are common in real pipelines - teams routinely codegen from third-party, vendor-hosted, or remotely fetched specs inside CI, making code execution a realistic supply-chain risk that even a mid-sized operator should treat as urgent given the developer/CI blast radius. No EPSS score, no CISA KEV entry, and no independently published exploit were provided, so there is no evidence of active exploitation; however, the fix commit includes tests with functional payloads (e.g., require('child_process').execSync('id')), which materially lowers the barrier to weaponization. Net: a genuine high priority for any team that generates zod schemas from untrusted specs, and low-to-moderate for teams that only ever process fully trusted, first-party specifications.

Exploit ScenarioDerived

An attacker publishes or tampers with an OpenAPI spec so that an enum's default value contains a backtick/${...} payload such as ${require('child_process').execSync('id')}. A developer or CI pipeline runs Orval's zod generation against that spec and imports the resulting schema module, at which point the template literal is evaluated and the attacker's JavaScript executes in that environment. The fix commit's own test payloads demonstrate this pattern, so a working proof of concept is effectively public even though no standalone exploit was released.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
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 – Aug 19, 2026

Code execution in Orval before 8.21.0 occurs when its zod schema generator processes an attacker-controlled OpenAPI v3 or Swagger v2 specification: a ${...} expression or backtick placed in an enum default value is written unescaped into a module-level JavaScript template literal, so simply importing the generated schema module evaluates the attacker's code in the developer, CI, test, or application runtime. This is a CWE-94 code-injection flaw (CVSS 9.3) affecting the packages/zod/src/index.ts formatDefaultValue routine. No CISA KEV listing and no separately published exploit exist at time of analysis, though the vendor's fix commit ships tests containing working injection payloads.

RemediationAI

Vendor-released patch: upgrade Orval to 8.21.0 or later, which escapes spec-sourced values via jsesc before emitting them into generated code (fix in PR https://github.com/orval-labs/orval/pull/3692 and commit https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6; advisory https://github.com/orval-labs/orval/security/advisories/GHSA-3575-w9fc-c2j6). Until upgraded, treat every OpenAPI/Swagger spec as untrusted input: source specs only from first-party, access-controlled locations and pin/verify their integrity, which prevents attacker injection but does not help if an upstream vendor spec is itself compromised. As additional compensating controls, run Orval codegen in a sandboxed or ephemeral CI job with no secrets and restricted network/filesystem access to limit blast radius, and code-review generated zod modules (grep for unexpected backticks or ${...} in default values) before importing or building them - the trade-off being added pipeline friction and reviewer burden.

Affected VersionsENISA

orval < 8.21.0

Affected Packages

npm orval fix: 8.21.0

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 TypeScript client generator that turns OpenAPI/Swagger definitions into type-safe clients and validation schemas, including a zod target. In JavaScript, template literals delimited by backticks interpolate any ${...} expression they contain and execute it at evaluation time. The vulnerable formatDefaultValue function emitted enum default values directly into such a module-level template literal without escaping backticks, backslashes, or ${...} sequences, so spec-supplied text was treated as live code rather than inert string data. This is a classic CWE-94 (Improper Control of Generation of Code) sink: untrusted input crosses into a code-generation context. The upstream fix (PR #3692) introduces the jsesc library and a jsStringLiteralEscape helper to safely encode spec-sourced strings across related sinks (enum defaults, object keys, route/server URLs).

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 (GitHub_M) 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 needs no privileges, but the victim must run codegen against a malicious spec and import the output, so UI:R; full unsandboxed RCE gives C/I/A:H with no scope change.

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

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
Aug 19, 2026 - 18:03 EUVD
CVE Published
Aug 19, 2026 - 17:37 cve.org
CRITICAL 9.3

DescriptionCVE.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 enum 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.

Executive ViewAI

Why It Matters

Orval code-generation library before version 8.21.0 contains a critical code-injection vulnerability that executes attacker-controlled code when processing a malicious OpenAPI specification. Any developer, CI/CD pipeline, or application runtime that imports a generated schema from an untrusted specification faces immediate code execution risk, potentially compromising the entire build and deployment chain. Organizations using Orval must upgrade immediately to prevent attackers from injecting code through supply-chain manipulation of API specifications.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Medium
popular TypeScript OpenAPI client generator, but developer-tooling not runtime-ubiquitous
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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 Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

66
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: +20
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-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

CVE-2026-62680 HIGH POC
7.1 Aug 19

External $ref resolution in Orval prior to version 8.22.0 allows server-side request forgery and path traversal against

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