AAK-MCP-FROMOPENAPI-CVE-2026-59973-001: mcp-from-openapi below 2.5.0 (external $ref guard does not resolve or pin addresses — SSRF)
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
McpFromOpenapiRefSsrf
What it detects
mcp-from-openapi (npm) from 2.3.0 until 2.5.0 forwards untrusted OpenAPI url and spec inputs, and loadOptions.refResolution, from loadOPENAPISpec() in libs/adapters/src/openapi/openapi.adapter.ts into OpenAPIToolGenerator.fromURL() and .fromJSON(). The external $ref guard compares parsed hostname strings without resolving addresses, pinning the validated address, revalidating redirect targets, or normalizing IPv4-mapped IPv6 forms. An authenticated user who can import or configure an OpenAPI specification in a hosted or multi-user deployment therefore causes backend-origin requests to internal services via DNS-to-loopback resolution, redirect-to-loopback behaviour, or ::ffff: loopback forms, exposing internal administrative APIs, metadata-like services and other private endpoints (CVE-2026-59973, CVSS 8.5, CWE-918). The same defect ships in frontmcp and @frontmcp/adapters on their own 1.x line, where that package's existing 1.5.7 pin floor already covers the 1.5.0 fix; this rule exists because mcp-from-openapi runs a 2.x line that floor cannot express. Impact is lower where only a trusted local administrator can configure specs, and disabling external reference protocols prevents the request outright.
How to fix
Upgrade mcp-from-openapi to >= 2.5.0 and pin it (the sibling frontmcp and @frontmcp/adapters packages to >= 1.5.0). Disable external $ref resolution unless you need it. Where you must resolve remote references, resolve the hostname, reject private, loopback, link-local and IPv4-mapped IPv6 addresses, pin the validated address for the connection, and revalidate every redirect target rather than trusting the first hop.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-FROMOPENAPI-CVE-2026-59973-001
Limitations
Reads mcp-from-openapi in package.json, .mcp.json, mcp.json, claude_desktop_config.json and the package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles at the project root only, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (packages/app/package.json) or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-59973
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP05:2025 (Command Injection & Execution)
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-AGENT-04
- CSA AI Controls Matrix (AICM): IVS-04, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-FROMOPENAPI-CVE-2026-59973-001.md: the page then shows that text, with the registry reference appended under it.