Vulnerabilities in pkg:npm/@orval/mcp
PACKAGECVE-2026-22785 is a CRITICAL orval mcp client is vulnerable vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting @orval/mcp libraries in the npm ecosystem. The issue involves orval mcp client is vulnerable to a code injection attack.. Remediation is available by upgrading affected packages to version 7.18.0.
pkg:npm/@orval/mcp
Vulnerability advisories affecting package pkg:npm/@orval/mcp. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-mwr6-3gp8-9jmj | CVE-2026-22785 | CRITICAL | orval MCP client is vulnerable to a code injection attack. |
CVE-2026-22785 at a Glance
How to Fix CVE-2026-22785
To remediate this vulnerability, upgrade all affected @orval/mcp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @orval/mcp@7.18.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @orval/mcp
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-22785, inspect your project dependencies using npm:
npm ls @orval/mcp
Analyze the terminal output to locate any version of @orval/mcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.18.0), your application is affected.
Note: The npm ls @orval/mcp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In @orval/mcp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-22785 Affected @orval/mcp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@orval/mcp
|
npm |
< 7.18.0
|
7.18.0
|
References
Frequently Asked Questions
What is CVE-2026-22785?
Which @orval/mcp versions are affected?
What version fixes CVE-2026-22785?
Is @orval/mcp affected?
What CWE is associated with CVE-2026-22785?
How can I check npm dependencies for CVE-2026-22785?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mwr6-3gp8-9jmj",
"modified" : "2026-01-13T19:12:22Z",
"published" : "2026-01-13T19:12:22Z",
"aliases" : [ "CVE-2026-22785" ],
"summary" : "orval MCP client is vulnerable to a code injection attack.",
"details" : "### Impact\nThe 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.\n\nHere is an example OpenAPI with the exploit\n\n```yaml\nopenapi: 3.0.4\ninfo:\n title: Swagger Petstore - OpenAPI 3.0\n description: |-\n This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\n Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\n You can now help us improve the API whether it's by making changes to the definition itself or to the code.\n That way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\n Some useful links:\n - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\n termsOfService: https://swagger.io/terms/\n contact:\n email: apiteam@swagger.io\n license:\n name: Apache 2.0\n url: https://www.apache.org/licenses/LICENSE-2.0.html\n version: 1.0.27-SNAPSHOT\nexternalDocs:\n description: Find out more about Swagger\n url: https://swagger.io\nservers:\n - url: https://petstore3.swagger.io/api/v3\ntags:\n - name: pet\n description: Everything about your Pets\n externalDocs:\n description: Find out more\n url: https://swagger.io\n - name: store\n description: Access to Petstore orders\n externalDocs:\n description: Find out more about our store\n url: https://swagger.io\n - name: user\n description: Operations about user\npaths:\n /pet/findByStatus:\n get:\n tags:\n - pet\n summary: Finds Pets by status.' + require('child_process').execSync(\"open -a Calculator\").toString(),//\n description: Multiple status values can be provided with comma separated strings.\n operationId: findPetsByStatus\n parameters:\n - name: status\n in: query\n description: Status values that need to be considered for filter\n schema:\n type: string\n responses:\n '200':\n description: successful operation\n content:\n application/json:\n schema:\n type: string\n '400':\n description: Invalid status value\n default:\n description: Unexpected error\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n ```\n \n\n### Patches\nThis is fixed in version 7.18.0 or higher\n\n### Workarounds\nDo check your generated OpenAPI yaml/json before running through Orval CLI and correct it if it has injection.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@orval/mcp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.18.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/orval-labs/orval/security/advisories/GHSA-mwr6-3gp8-9jmj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22785"
}, {
"type" : "WEB",
"url" : "https://github.com/orval-labs/orval/commit/80b5fe73b94f120a3a5561952d6d4b0f8d7e928d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/orval-labs/orval"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-13T19:12:22Z",
"nvd_published_at" : "2026-01-12T19:16:04Z"
}
}