Description
orval before 8.29.0 fails to escape OpenAPI media-type keys when emitting them into single-quoted Content-Type string literals in generated code. Attackers can inject JavaScript through crafted media-type keys in OpenAPI specifications that executes when generated fetch operations or mock resolvers are invoked.
Published: 2026-09-23
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

The vulnerability resides in the way orval handles media-type keys within OpenAPI specifications. These keys are inserted into single-quoted Content-Type string literals in the generated code without proper escaping. If an attacker supplies a crafted media-type key, the resulting JavaScript code is executed when the generated fetch operation or mock resolver runs. This flaw is a classic code-injection problem (CWE-94) that can lead to remote code execution in the environment where the generated code is executed.

Affected Systems

All releases of orval produced by orval-labs prior to version 8.29.0 are affected. The product is the orval command-line tool that generates client code from OpenAPI specifications. Any system that uses orval to generate fetch libraries or mock servers from a spec containing unescaped media-type keys is at risk until the code is regenerated with a patched version.

Risk and Exploitability

The CVSS score of 9.3 reflects the high impact and requirement for the attacker to supply a malicious OpenAPI document. The EPSS score is unavailable but the lack of KEV listing does not diminish the intrinsic severity. Attackers can achieve arbitrary JavaScript execution by crafting media-type values in a specification that an organization feeds to orval, causing the generated code to execute the payload upon use. Consequently, the exposure risk remains high until the environment is patched or the input sanitized.

Generated by OpenCVE AI on September 23, 2026 at 17:37 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade orval to version 8.29.0 or newer to eliminate the injection path.
  • If immediate upgrade is not possible, sanitize or escape media-type keys in the OpenAPI specification before processing or remove problematic media-type entries.
  • Disable orval's automated code generation for fetch operations that include user-provided media-types until the patch is applied.

Generated by OpenCVE AI on September 23, 2026 at 17:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 23 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 23 Sep 2026 16:45:00 +0000

Type Values Removed Values Added
Description orval before 8.29.0 fails to escape OpenAPI media-type keys when emitting them into single-quoted Content-Type string literals in generated code. Attackers can inject JavaScript through crafted media-type keys in OpenAPI specifications that executes when generated fetch operations or mock resolvers are invoked.
Title orval before 8.29.0 Code Injection via unescaped OpenAPI media-type
First Time appeared Orval
Orval orval
Weaknesses CWE-94
CPEs cpe:2.3:a:orval:orval:*:*:*:*:*:*:*:*
Vendors & Products Orval
Orval orval
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

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


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-09-23T17:48:29.041Z

Reserved: 2026-09-23T15:58:30.841Z

Link: CVE-2026-96757

cve-icon Vulnrichment

Updated: 2026-09-23T17:48:16.312Z

cve-icon NVD

Status : Deferred

Published: 2026-09-23T17:17:24.923

Modified: 2026-09-23T18:17:12.200

Link: CVE-2026-96757

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-23T18:15:07Z

Weaknesses
  • CWE-94

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