Description
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a single quote in a schema property name is emitted into single-quoted object keys in generated MSW mock factories without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated mock factory is called by tests or an MSW handler, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/keys.ts function getKey and MSW mock generation. 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 generates type‑safe JavaScript clients from OpenAPI v3 and Swagger v2 specifications. In its MSW mock generator, a single quote in a schema property name is inserted directly into a single‑quoted object key without proper escaping, producing untrusted JavaScript that is later evaluated when the generated mock factory is called by tests or an MSW handler. This flaw allows an attacker who can supply a crafted OpenAPI specification to inject and execute arbitrary JavaScript in the environment that consumes the generated mock, such as a developer’s machine, a continuous‑integration pipeline or a running application. The vulnerability is a form of code injection, described by the listed CWEs (CWE‑89 and CWE‑95). The impact is full remote code execution with the privileges of the executing process, potentially exposing secrets, tampering with data, or disrupting availability.

Affected Systems

The vulnerability affects the orval‑labs project named orval, specifically any release of the package prior to version 8.21.0. Users running pre‑8.21.0 builds of the orval library are at risk.

Risk and Exploitability

The CVSS score of 9.3 indicates a critical severity. The EPSS score of <1% indicates a very low but non‑zero probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is the ability of an attacker to insert a crafted property name containing a single quote into an OpenAPI specification, which then propagates into generated JavaScript that will be evaluated by the MSW mock. This scenario could be targeted by malicious contributors or by anyone who can supply an OpenAPI spec to a build system that uses orval for code generation.

Generated by OpenCVE AI on August 20, 2026 at 14:19 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Orval to version 8.21.0 or later.
  • Validate and sanitize OpenAPI specifications before feeding them to Orval to ensure that schema property names do not contain suspicious characters that could lead to injection.
  • Restrict the use of untrusted OpenAPI specifications by implementing code‑review gates or CI checks, and run the generated mock factories in an isolated, least‑privileged environment.

Generated by OpenCVE AI on August 20, 2026 at 14:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-2w86-xfrc-g85r Orval: RCE via schema property name -> computed-property-key injection in the MSW mock generator
History

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: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, a single quote in a schema property name is emitted into single-quoted object keys in generated MSW mock factories without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated mock factory is called by tests or an MSW handler, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/keys.ts function getKey and MSW mock generation. This issue is fixed in version 8.21.0.
Title Orval: RCE via schema property name -> computed-property-key injection in the MSW mock generator
Weaknesses CWE-89
CWE-95
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:21:51.339Z

Reserved: 2026-08-07T18:26:53.524Z

Link: CVE-2026-71867

cve-icon Vulnrichment

Updated: 2026-08-19T18:21:32.015Z

cve-icon NVD

Status : Received

Published: 2026-08-19T18:17:24.277

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

Link: CVE-2026-71867

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T14:30:03Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

  • CWE-95

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')