Description
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.
Published: 2026-08-19
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Orval is a code‑generation tool that produces type‑safe JavaScript clients from OpenAPI v3 or Swagger v2 specifications. In vulnerable releases prior to 8.21.0, the generator emits an unescaped backtick present in an OpenAPI path straight into JavaScript template literals used for constructing request URLs. This omission allows malicious JavaScript to be evaluated whenever the generated request, URL‑builder, or query‑key function is invoked, leading to remote code execution in the environment that consumes the client.

Affected Systems

The impacted product is orval‑labs:orval. All releases before v8.21.0 embed a code‑generation path that fails to escape backticks in OpenAPI paths and outputs them directly into JavaScript template literals used by axios, fetch, react‑query, and SWR clients. Clients or applications that consume the generated code from these vulnerable releases are therefore exposed, especially if the OpenAPI specification contains attacker‑controlled backticks.

Risk and Exploitability

Based on the description, it is inferred that an attacker who can influence or host a malicious OpenAPI specification can cause the injected JavaScript to execute when the generated client code is called, allowing arbitrary code execution. The CVSS score of 9.3 indicates high severity; the EPSS score is unavailable, and the vulnerability is not listed in the CISA KEV catalog, which does not lower the risk. The most likely exploitation scenario occurs in development or CI environments where the client code is generated from untrusted specs, but a compromised production application that builds URLs from untrusted specifications could also be affected.

Generated by OpenCVE AI on August 20, 2026 at 13:28 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade orval to version 8.21.0 or later, which removes the backtick injection flaw.
  • If a patch cannot be applied immediately, sanitize any backticks in OpenAPI paths before generating the client, for example by replacing them with an escaped sequence or removing the risky characters entirely.
  • Verify that all OpenAPI specifications used to generate clients are from trusted sources and that no external or untrusted input can modify paths before generation.

Generated by OpenCVE AI on August 20, 2026 at 13:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-fg9p-mrxr-hvq7 Orval: RCE via OpenAPI path -> unescaped request-URL template literal (backtick breakout)
History

Fri, 21 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 19 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Orval-labs
Orval-labs orval
Vendors & Products Orval-labs
Orval-labs orval

Wed, 19 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Orval: RCE via OpenAPI path -> unescaped request-URL template literal (backtick breakout)
Weaknesses CWE-116
CWE-1336
CWE-94
References
Metrics cvssV4_0

{'score': 9.3, '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'}


Subscriptions

Orval-labs Orval
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-21T19:42:09.266Z

Reserved: 2026-07-14T20:22:04.395Z

Link: CVE-2026-62681

cve-icon Vulnrichment

Updated: 2026-08-21T19:42:01.228Z

cve-icon NVD

Status : Received

Published: 2026-08-19T18:16:54.383

Modified: 2026-08-21T20:16:38.583

Link: CVE-2026-62681

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T13:30:17Z

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')