Description
orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Prior to 7.18.0, the MCP server generation logic relies on string manipulation that incorporates the summary field from the OpenAPI specification without proper validation or escaping. This allows an attacker to "break out" of the string literal and inject arbitrary code. This vulnerability is fixed in 7.18.0.
Published: 2026-01-12
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote code execution via code injection in generated JavaScript clients
Action: Immediate Patch
AI Analysis

Impact

orval’s MCP client allows an attacker to inject arbitrary code by exploiting a lack of proper validation or escaping when incorporating the summary field from an OpenAPI specification into string manipulation during client generation. The vulnerability can lead to the execution of unintended code in the generated JavaScript (TypeScript) client, compromising confidentiality, integrity, or availability of systems that consume the malicious client.

Affected Systems

The vulnerability affects the orval tool produced by orval-labs, specifically versions prior to 7.18.0. All releases before 7.18.0 that rely on the MCP server generation logic are susceptible.

Risk and Exploitability

The issue has a CVSS score of 9.3, indicating high severity, and an EPSS score of less than 1%, suggesting exploitation is not common but still technically possible. It is not currently listed in the CISA KEV catalog. The attack vector is inferred to be the delivery of a crafted OpenAPI specification that contains a malicious summary field to the MCP server, thereby enabling injection of arbitrary JavaScript code.

Generated by OpenCVE AI on April 18, 2026 at 16:27 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the official patch by upgrading orval to version 7.18.0 or later.
  • When upgrading is delayed, sanitize the summary field in any OpenAPI specification before feeding it to the MCP server – escape or strip characters that could break out of string literals.
  • Restrict the use of the MCP server to trusted OpenAPI specifications only, or disable the feature for untrusted sources until a patch is applied.

Generated by OpenCVE AI on April 18, 2026 at 16:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-mwr6-3gp8-9jmj orval MCP client is vulnerable to a code injection attack.
History

Thu, 26 Feb 2026 20:15:00 +0000

Type Values Removed Values Added
First Time appeared Orval
Orval orval
CPEs cpe:2.3:a:orval:orval:*:*:*:*:*:*:*:*
Vendors & Products Orval
Orval orval
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'}


Tue, 13 Jan 2026 09:30:00 +0000

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

Mon, 12 Jan 2026 19:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 12 Jan 2026 19:00:00 +0000

Type Values Removed Values Added
Description orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Prior to 7.18.0, the MCP server generation logic relies on string manipulation that incorporates the summary field from the OpenAPI specification without proper validation or escaping. This allows an attacker to "break out" of the string literal and inject arbitrary code. This vulnerability is fixed in 7.18.0.
Title orval MCP client is vulnerable to a code injection attack.
Weaknesses CWE-77
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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-01-12T18:56:50.902Z

Reserved: 2026-01-09T18:27:19.388Z

Link: CVE-2026-22785

cve-icon Vulnrichment

Updated: 2026-01-12T18:56:47.592Z

cve-icon NVD

Status : Analyzed

Published: 2026-01-12T19:16:04.287

Modified: 2026-06-17T10:20:25.400

Link: CVE-2026-22785

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-18T16:30:05Z

Weaknesses
  • CWE-77

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