CVE-2026-62681
moderateCode-injection RCE in Orval generated API clients via unescaped OpenAPI path
Orval, an npm tool that generates TypeScript API clients (axios, fetch, react-query, and swr) from OpenAPI descriptions, inserts the OpenAPI route path directly into generated request-URL template literals without escaping. If the path in the OpenAPI document contains a backtick, it terminates the template literal and injects a JavaScript expression that is evaluated whenever the generated request function, URL builder, or query-key function is called, giving the attacker arbitrary code execution. An attacker who controls or can influence the API specification — for example a third-party API's published OpenAPI file consumed by a team's build, CI pipeline, or application — gains code execution on developer machines, CI runners, or in the running application's environment. Users of Orval (vulnerability verified on 8.19.0; full affected version range not specified in available data) are affected, and this flaw is distinct from Orval's four previously published CVEs, which cover different fields and sinks not addressed by those fixes. No public proof-of-concept, in-the-wild exploitation, or CISA KEV listing is known; EPSS estimates a 0.5% probability of exploitation within 30 days.
What to do: Audit generated Orval clients (axios, fetch, react-query, swr) for URL template literals containing unescaped backticks or injected expressions, especially where OpenAPI documents originate from third parties, and treat generated output as untrusted code in builds and bundles until patched. As a mitigation, escape or restrict path characters (backtick and ${) in OpenAPI documents before generation. Apply the upstream fix when a patched Orval release is published — no fixed version is confirmed in the available data — and note that the fixes for Orval's earlier CVE-2026-22785, CVE-2026-23947, CVE-2026-25141, and CVE-2026-24132 do not cover this path-based sink.
| Orval project (npm: orval) Orval OpenAPI-to-TypeScript client generator (axios, fetch, react-query, and swr clients) | Verified vulnerable on 8.19.0; affected version range not specified in available data |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, an unescaped backtick in an OpenAPI path is emitted into request URL template literals generated for axios, fetch, react-query, and SWR clients without safe encoding. This permits attacker-controlled JavaScript to be evaluated when a generated request, URL-builder, or query-key function is called, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/route.ts and route generation consumers. This issue is fixed in version 8.21.0.
- Ecosystems
- npm
- Weakness
- CWE-94, CWE-116, CWE-1336
- Vector
- 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
- GHSA
- GHSA-fg9p-mrxr-hvq7 (critical)
In the news0 stories
No ingested article mentions this CVE yet.