Severity by source
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
Spec is attacker-controllable over the network (AV:N) but the victim must run codegen and import the generated module (UI:R); no auth needed (PR:N) and arbitrary code execution yields full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
4DescriptionCVE.org
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a double quote in a query parameter name is emitted into the generated request-validation zod.object({...}) schema 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 and query request-validation generation. This issue is fixed in version 8.21.0.
AnalysisAI
Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 / Swagger v2 specification achieve arbitrary code execution: a double-quote character in a query parameter name is written verbatim into the generated request-validation zod.object({...}) schema, so importing that generated module evaluates embedded JavaScript. Any developer workstation, CI runner, test harness, or application that generates a zod client from a malicious or tampered spec is affected. There is no public exploit identified at time of analysis, but the vendor's own fix commit ships tests demonstrating payloads such as require('fs').execSync('id'); it is not listed in CISA KEV and no EPSS score was provided.
Technical ContextAI
Orval is a TypeScript code generator that turns OpenAPI/Swagger specifications into type-safe HTTP clients, including optional zod runtime-validation schemas produced by the packages/zod generator. The root cause is CWE-94 (Improper Control of Generation of Code): the object-key emitter in packages/core/src/getters/keys.ts wrapped non-identifier keys in single quotes but did not escape their contents, so a query-parameter name lifted from the spec was placed directly into generated source. The CPE cpe:2.3:a:orval-labs:orval identifies the affected package. The fix (PR #3692, commit 8ef1bfd) introduces a jsStringLiteralEscape helper backed by the jsesc library so keys - and, per the related GHSA-88f2-fpv8-89q2 changes, server URLs and path segments - are safely escaped before being embedded as JS string/template literals.
RemediationAI
Vendor-released patch: 8.21.0 - upgrade the orval dev dependency to 8.21.0 or later (release notes: https://github.com/orval-labs/orval/releases/tag/v8.21.0; advisory: https://github.com/orval-labs/orval/security/advisories/GHSA-653q-5476-x79g; fix in PR https://github.com/orval-labs/orval/pull/3692 and commit 8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6). Until you can upgrade, do not run Orval codegen against OpenAPI/Swagger specs from untrusted or externally-controlled sources, and treat any spec fetched over the network as untrusted; if you must, review the generated zod schema files for suspicious content before importing them and run codegen in an isolated, unprivileged sandbox (container or ephemeral CI job with no secrets) so injected code cannot reach credentials - the trade-off is added pipeline friction and manual review overhead. As a source-side control, validate/reject parameter names containing quote or backslash characters in your spec-linting step before it reaches Orval.
orval (TypeScript API client generator) before 7.18.0 has code injection via OpenAPI specification summary fields in MCP
Arbitrary code execution in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swag
Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 or Swagger v2 specification execute arbitra
Code injection in Orval before 8.21.0 lets an attacker who controls an OpenAPI v3 or Swagger v2 specification embed exec
Arbitrary code execution in Orval before 8.21.0 arises when the code generator emits an unescaped backtick (or ${...}) f
Code injection in Orval, a TypeScript/JavaScript API client generator, allows a malicious OpenAPI v3 or Swagger v2 speci
Code execution in Orval before 8.21.0 occurs when its zod schema generator processes an attacker-controlled OpenAPI v3 o
Arbitrary code execution in Orval (OpenAPI/Swagger TypeScript client generator) before 8.21.0 lets an attacker who contr
Code injection in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swagger v2 spe
Code injection in Orval, a TypeScript client generator for OpenAPI v3 and Swagger v2 specs, allows arbitrary JavaScript
I analyzed the provided intelligence and produced the synthesis below. One thing to flag first: **⚠️ Prompt-injection n
External $ref resolution in Orval prior to version 8.22.0 allows server-side request forgery and path traversal against
Same weakness CWE-94 – Code Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-62604
GHSA-653q-5476-x79g