CVE-2026-22785

orval MCP client is vulnerable to a code injection attack.

Published Jan 12, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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

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

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

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

Weaknesses
  • CWE-77

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 12, 2026, 6:56 PM
Reserved
Jan 9, 2026, 6:27 PM
Status
Analyzed
Published
Jan 12, 2026, 7:16 PM
Modified
Jun 17, 2026, 10:20 AM