@orval/mcp (OpenAPI MCP server codegen injection) | Critical | 9.8| Field | Value |
|---|---|
| CVE / NVD | CVE-2026-22785 |
| EPSS score | 0.000420000 (FIRST EPSS, 2026-05-29) |
| Date (index) | 2026-01-12 |
| Affected product (index) | @orval/mcp (Orval MCP server generation from OpenAPI) |
| GHSA ID | GHSA-mwr6-3gp8-9jmj |
| OWASP MCP Top 10 (2025) | MCP05 — Command Injection & Execution |
| Published / disclosed | 2026-01-12 |
| Ecosystem | npm |
| Component | @orval/mcp MCP server generation |
| CVSS score | 9.8 CVSS v3.1 (NVD) / Critical CVSS v4.0 (GitHub CNA) |
| CWE | CWE-77 |
| Affected versions | < 7.18.0 |
| Fixed versions | 7.18.0 |
| Fix status | Patched |
| Exploit status | Public advisory |
| Notes | Added during the 2026-05-29 NVD gap review. Malicious OpenAPI summary fields can break out of generated string literals during MCP server codegen. |
orval generates type-safe TypeScript clients from OpenAPI specifications. Prior to 7.18.0, the MCP server generation logic incorporates the OpenAPI summary field into generated code via string manipulation without proper validation or escaping. An attacker who can supply or influence the OpenAPI document can break out of string literals and inject arbitrary code into generated MCP server output.
The victim runs Orval against attacker-controlled or poisoned OpenAPI YAML/JSON (supply-chain document, compromised spec repo, or untrusted third-party API definition). No network authentication is required at generation time.
Command/code injection (CWE-77) from unsanitized OpenAPI metadata embedded in generated MCP server source.
MCP server scaffolding turns API metadata into executable TypeScript. A poisoned spec becomes a build-time RCE path for every developer or CI job that runs Orval MCP generation on it.
Review orval-labs/orval MCP server generation templates; summary field concatenation without escaping.
Upgrade orval to 7.18.0 or later. Review OpenAPI inputs before running the Orval CLI in CI; treat third-party specs as untrusted.
@orval/mcp to 7.18.0+ in lockfiles.Public advisory; do not host weaponized OpenAPI payloads in this repository.
package.json / lockfiles for orval or @orval/mcp versions < 7.18.0.Upgrade to orval 7.18.0 or later.