Orval MCP Server Code Injection Vulnerability
Vulnerability
A code injection vulnerability has been identified in the Orval tool, specifically in the MCP server generation logic of version 7.17.2 prior to 7.18.0. The issue arises from improper validation and escaping of the summary field in OpenAPI specifications, allowing attackers to inject arbitrary code by manipulating string literals. This vulnerability is particularly concerning as it could be exploited to execute malicious code within the application.
Impact
Exploitation of this vulnerability allows for arbitrary code execution on the server where the MCP client is used.
Reproduction
To reproduce this vulnerability, create an OpenAPI specification that includes a summary field with a crafted payload. This payload should be designed to 'break out' of the string context and inject code. Once this specification is processed by the Orval MCP client version 7.17.2, the injected code will be executed, demonstrating the vulnerability.
Remediation
Users can upgrade to Orval version 7.18.0 or higher to address this vulnerability. If an upgrade is not possible, it is recommended to manually sanitize the OpenAPI specifications before using them with the Orval CLI.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
