Skip to main content

Orval EUVDEUVD-2026-62601

| CVE-2026-71871 CRITICAL
Code Injection (CWE-94)
2026-08-19 GitHub_M GHSA-8j6p-r8jg-mxqh
9.3
CVSS 4.0 · Vendor: GitHub_M
Share

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
8.8 HIGH

Malicious spec is deliverable over the network (AV:N) with no attacker privileges (PR:N), but the victim must run codegen and import the module (UI:R); import-time execution yields full C:H/I:H/A:H on the build host without crossing a security authority (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:N/PR:N/UI:A/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
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
Source Code Evidence Fetched
Aug 19, 2026 - 18:21 vuln.today
Analysis Generated
Aug 19, 2026 - 18:21 vuln.today
Patch available
Aug 19, 2026 - 18:03 EUVD
CVE Published
Aug 19, 2026 - 17:33 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 header parameter 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.

AnalysisAI

Code injection in Orval, a TypeScript client generator for OpenAPI v3 and Swagger v2 specs, allows arbitrary JavaScript execution when a malicious API specification is processed. In versions prior to 8.21.0, a ${...} interpolation or backtick placed in a header parameter's default value is emitted unescaped into a module-level template literal by the zod schema generator (formatDefaultValue in packages/zod/src/index.ts), so the payload runs the moment the generated schema module is imported in a developer, CI, test, or application environment. No public exploit has been identified at time of analysis, though the fixing PR (#3692) ships proof-of-concept-grade tests demonstrating require('child_process').execSync payloads; the flaw carries a high CVSS 4.0 score of 9.3.

Technical ContextAI

Orval consumes OpenAPI/Swagger documents and emits TypeScript client code, including zod runtime validation schemas. Values taken from the input specification - here the default value of a header parameter - are string-concatenated into generated source that uses JavaScript template literals (backtick-delimited strings). Because template literals evaluate ${...} interpolation and backticks delimit the literal, any such sequence in the untrusted default breaks out of the intended string context and becomes executable code, the classic CWE-94 (Improper Control of Generation of Code / code injection) root cause. The fix introduces the jsesc library and a jsStringLiteralEscape/getKey helper to safely encode backticks, ${, and backslashes across multiple emitters (zod defaults, route/server URLs, and object keys), indicating the unsafe-emission pattern spanned several code paths, not just the zod default handler. Affected package per CPE is cpe:2.3:a:orval-labs:orval.

RemediationAI

Vendor-released patch: upgrade Orval to 8.21.0 or later (release https://github.com/orval-labs/orval/releases/tag/v8.21.0), which adds jsesc-based escaping of backticks, ${, and backslashes in generated output. Until upgrading, do not run Orval codegen against OpenAPI/Swagger specifications from untrusted or externally controlled sources, and treat spec files as untrusted input in CI - pin and review any third-party spec before generation. As a compensating control, run code generation in an isolated, network-restricted, least-privilege sandbox (e.g. an ephemeral container without credentials or outbound network) so that any injected code cannot reach secrets or production systems; the trade-off is added build complexity. You can also manually audit generated zod schema modules for unexpected ${...}/backtick sequences before importing them, though this scales poorly. Reference the advisory GHSA-8j6p-r8jg-mxqh for details.

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

Share

EUVD-2026-62601 vulnerability details – vuln.today

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