Skip to content

AAK-MCP-AUTHFETCH-CVE-2026-49857-001: auth-fetch-mcp 3.0.1 or earlier (IPv4-mapped IPv6 loopback bypasses the SSRF guard)

Severity
HIGH
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
AuthFetchMcpMappedIpv6LoopbackBypass

What it detects

auth-fetch-mcp, an MCP server that fetches authenticated web pages for assistants, blocks private and loopback destinations in assertSafeUrl() (src/security.ts), but its isPrivateV6() check misses IPv4-mapped IPv6 loopback addresses in hex-normalised form. A URL such as http://[::ffff:127.0.0.1]:PORT/ is silently normalised by the Node WHATWG URL parser to [::ffff:7f00:1]; because net.isIPv4('7f00:1') is false, the private-address check does not fire and the URL reaches the browser or HTTP client, so an MCP tool call reaches loopback services the guard exists to protect. Exploitable under the default configuration with no special environment variable (CVE-2026-49857, CVSS 7.4). GHSA-pvrj-8cg3-j5f8 records the affected range as <= 3.0.1 with 3.0.2 the first patched release — note the NVD text's claim that 3.0.1 patches the issue is contradicted by the advisory's own version data.

How to fix

Upgrade auth-fetch-mcp to >= 3.0.2 and pin it. When validating a destination, resolve the host and test the resulting address, rather than pattern-matching the textual form: normalise IPv4-mapped IPv6 (::ffff:a.b.c.d, including its hex form) to IPv4 before the private-range check, and re-check after any redirect.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-AUTHFETCH-CVE-2026-49857-001

Limitations

Reads auth-fetch-mcp in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, 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), in .cursor/mcp.json or .vscode/mcp.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-49857
  • 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-SSRF-01 (Internal Network MCP)

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-AUTHFETCH-CVE-2026-49857-001.md: the page then shows that text, with the registry reference appended under it.