Skip to content

AAK-MCP-TUNNEL-001: MCP Tunnels proxy: SSRF defense disabled or bypassed

Severity
CRITICAL
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_tunnel.py
Auto-fixable
No.
SARIF name
McpTunnelSsrfDefenseDisabled

What it detects

An MCP Tunnels gateway-proxy config (/etc/mcp-gateway/config.yaml or the Helm gateway.config.* ConfigMap) either sets upstream.disable_ip_validation: true or names an upstream.allowed_ips CIDR that covers the public internet (0.0.0.0/0, ::/0, or a /0–/7 IPv4 prefix). The reference page calls upstream.allowed_ips the proxy's primary SSRF defense; disabling it lets a malicious upstream-side process reach arbitrary hosts the proxy can route to.

How to fix

Set upstream.allowed_ips to the smallest CIDR ranges that cover your MCP servers (the reference's default is the RFC1918 private space). Remove disable_ip_validation: true. See https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/security (Restrict upstream.allowed_ips).

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

agent-audit-kit scan . --rules AAK-MCP-TUNNEL-001

Limitations

Fires on upstream.disable_ip_validation: true, or an upstream.allowed_ips entry that is 0.0.0.0/0 or ::/0 or has an IPv4 prefix of /7 or shorter or an IPv6 prefix of /31 or shorter, in a YAML document with tunnel_domain and routes at the top (or under gateway.config); every document of a multi-document file is read. Only a file named config, proxy or values (.yaml or .yml), or one under a directory named tunnel, gateway, mcp-tunnel, mcp-tunnels, mcp-gateway, mcp_tunnel or mcp_gateway, is read, so the same settings embedded as a string in a Kubernetes ConfigMap's data:, or set in a document with no tunnel_domain and routes of its own (an override layered onto another document), are not seen.

References


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