# CVE-2026-22785: orval MCP client is vulnerable to a code injection attack.

- Severity: Critical 9.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.78%, higher than 57% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-12T18:43:16.637Z
- Modified: 2026-06-17T10:20:25.400Z
- Also known as: GHSA-mwr6-3gp8-9jmj
- Weaknesses: CWE-77
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- orval-labs orval: < 7.18.0
- @orval/mcp (npm): before 7.18.0
- orval orval: before 7.18.0

## Every score

- GitHub_M: CVSS:4.0 9.3 Critical `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`
- GitHub: CVSS:4.0 Critical `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`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/orval-labs/orval/security/advisories/GHSA-mwr6-3gp8-9jmj> (exploit, vendor-advisory, web)
- <https://github.com/orval-labs/orval/commit/80b5fe73b94f120a3a5561952d6d4b0f8d7e928d> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-22785> (advisory)
- <https://github.com/orval-labs/orval> (package)

## Sources

- CVE List: [CVE-2026-22785](https://www.cve.org/CVERecord?id=CVE-2026-22785), CVE Terms of Use, modified 2026-01-12
- GitHub Advisory Database: [GHSA-mwr6-3gp8-9jmj](https://github.com/advisories/GHSA-mwr6-3gp8-9jmj), CC-BY-4.0, modified 2026-02-03
- NVD: [CVE-2026-22785](https://nvd.nist.gov/vuln/detail/CVE-2026-22785), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-22785 · Whole record: https://cve.day/CVE-2026-22785.json · Rebuilt by cve.day 2026-11-25T22:59:12.735Z
