Orval Overload: From OpenAPI Spec to Remote Code Execution
Jan 14, 2026·6 min read·9 visits
Executive Summary (TL;DR)
If you use `orval` to generate MCP servers, a malicious OpenAPI spec can execute arbitrary code on your machine or CI/CD pipeline. The generator fails to escape `summary` and `operationName` fields, allowing attackers to break out of string literals and inject JavaScript logic into the resulting source file. Fixed in version 7.18.0.
A critical code injection vulnerability in the `orval` TypeScript client generator allows attackers to achieve Remote Code Execution (RCE) via malicious OpenAPI specifications. The flaw resides in the Model Context Protocol (MCP) generator, where metadata is unsafely interpolated into generated code.
Fix Analysis (1)
Technical Appendix
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NAffected Systems
Affected Versions Detail
| Product | Affected Versions | Fixed Version |
|---|---|---|
orval orval-labs | < 7.18.0 | 7.18.0 |
@orval/mcp orval-labs | < 7.18.0 | 7.18.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-77 |
| Attack Vector | Network (via malicious Spec) |
| CVSS | 9.3 (Critical) |
| EPSS Score | 0.00047 (Low) |
| Impact | Remote Code Execution (RCE) |
| Exploit Status | PoC Available |
MITRE ATT&CK Mapping
Improper Neutralization of Special Elements used in a Command ('Command Injection')
Known Exploits & Detection
Vulnerability Timeline
Subscribe to updates
Get the latest CVE analysis reports delivered to your inbox.