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 servers[0].url is emitted into request URL template literals generated when output.baseUrl.getBaseUrlFromSpecification is enabled without safe encoding. This permits attacker-controlled JavaScript to be evaluated when a generated request or URL-builder 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 function getFullRoute. 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

An unescaped backtick in the servers[0].url field of an OpenAPI specification is emitted directly into a request‑URL template literal when the getBaseUrlFromSpecification helper is enabled. When the generated route function or URL‑builder is called, the literal is evaluated as JavaScript, allowing an attacker‑controlled string to be executed. This flaw can compromise the developer’s machine, continuous‑integration servers, test environments, or the application itself, exposing confidential data or allowing further lateral movement. The weakness arises from improper input validation and unsafe string concatenation, corresponding to the identified issues of CWE‑94 (Code Injection), CWE‑116 (Improper Encoding or Escaping), and CWE‑1336 (Insecure Direct Object References).

Affected Systems

The vulnerability is present in the orval‑labs orval package prior to version 8.21.0. The affected code resides in packages/core/src/getters/route.ts within the getFullRoute function. Any system that generates a type‑safe JavaScript client from an OpenAPI v3 or Swagger v2 specification using the vulnerable version is impacted, regardless of whether the client runs in a browser, Node.js environment, or a CI pipeline.

Risk and Exploitability

The CVSS score of 9.3 indicates a critical severity. The EPSS score is currently unavailable, and the vulnerability is not listed in the CISA KEV catalog. An attacker who can supply or modify the OpenAPI specification (for example, via a public API gateway or a code‑integration pipeline) can trigger the exploitation by including an unescaped backtick in the servers[0].url value, which is then executed when the generated client function is invoked. Because the flaw is introduced during code generation rather than during runtime, no additional persistent changes to the client runtime environment are required for exploitation.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade orval to version 8.21.0 or later to receive the fix for unescaped URL characters.
  • If an upgrade is not immediately possible, disable the getBaseUrlFromSpecification option or avoid using remote OpenAPI specifications that may contain untrusted server URLs.
  • Validate or escape all servers[].url values in the specification before generating the client, ensuring backticks and other template‑literal delimiters are properly encoded or removed.

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

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-88f2-fpv8-89q2 Orval: RCE via servers[].url -> unescaped request-URL template literal (with getBaseUrlFromSpecification)
History

Wed, 19 Aug 2026 20:00: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 19: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:00: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 servers[0].url is emitted into request URL template literals generated when output.baseUrl.getBaseUrlFromSpecification is enabled without safe encoding. This permits attacker-controlled JavaScript to be evaluated when a generated request or URL-builder 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 function getFullRoute. This issue is fixed in version 8.21.0.
Title Orval: RCE via servers[].url -> unescaped request-URL template literal (with getBaseUrlFromSpecification)
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-19T18:19:27.462Z

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

Link: CVE-2026-62682

cve-icon Vulnrichment

Updated: 2026-08-19T18:18:58.103Z

cve-icon NVD

Status : Received

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

Modified: 2026-08-19T19:17:22.190

Link: CVE-2026-62682

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T13:15:03Z

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