Skip to content

AAK-MCP-009: MCP server URL contains an internal network address

Severity
HIGH
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_config.py
Auto-fixable
No.
SARIF name
McpLocalhostInternalUrl

What it detects

The MCP server URL contains a private-range address (10.x, 172.16-31.x, 192.168.x), a .local name, or a loopback address (localhost, 127.0.0.1, 0.0.0.0, ::1) somewhere other than its own host, such as a proxy target in the query, which may expose internal services (SSRF pattern). A server whose own host is loopback is not reported.

How to fix

Confirm you run and trust the server at that address. If it should not be there, remove the entry or point url at the intended public HTTPS endpoint. If it is deliberate (a dev server on your LAN or a sidecar), accept it by listing AAK-MCP-009 under exclude-rules in .agent-audit-kit.yml, with a comment saying why. The rule matches RFC 1918 private addresses, .local hosts, and a loopback address anywhere in the URL except its own host.

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

agent-audit-kit scan . --rules AAK-MCP-009

Limitations

Looks in the server url for the 10.x, 172.16-31.x and 192.168.x ranges, a .local name, or the text localhost, 127.0.0.1, 0.0.0.0 or ::1, and reads its host as a client does, so http://10.1/, http://0xa.0.0.5/ and http://%31%30.0.0.5/ are 10.x too, as is a wildcard-DNS name that embeds one (10-0-0-5.nip.io, 0a000005.nip.io); a URL whose own host is loopback (localhost, 127.0.0.0/8, ::1 or 0.0.0.0) is not reported. A URL that Node, requests and Rust's url crate read differently from curl, httpx and urlsplit, which keep a backslash inside the authority, is judged by the less safe of the two readings. Other internal addresses are not matched: a name such as mcp.corp.internal or the shared range 100.64.0.0/10.

References

  • OWASP MCP Top 10: MCP09:2025 (Shadow MCP Servers)
  • 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-009.md: the page then shows that text, with the registry reference appended under it.