Skip to content

AAK-MCP-DEST-UNVALIDATED-001: MCP-configured destination reaches an outbound fetch with no guard (absence or asymmetry)

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

What it detects

A destination that arrives through MCP server / webhook configuration — server_url, webhook_url, mcp_server_url and the like — is passed to an outbound HTTP call without a destination check, so a caller who can write that configuration steers the server at internal addresses and cloud metadata endpoints (http://169.254.169.254/). Two disclosed shapes, one defect. Absence (CVE-2026-86122, Rowboat through 0.9.1, CVSS 5.0): nothing in the module resolves or range-checks a destination at all. Asymmetry (CVE-2026-85666, OGX / ex-Llama Stack, CVSS 7.5): the guard exists and is called — OGX applies validate_url_not_private() to its other URL inputs — and is simply not applied to this one; on the default starter configuration, which runs unauthenticated, that also forwards attacker-supplied headers and bearer tokens to the chosen destination. The asymmetry arm is the higher-precision signal, and it is the same class this scanner already detects at two other layers: AAK-MCPWN-001 (auth middleware present on one route but not its twin) and AAK-MCP-TOOLGATE-ASYMMETRY-001 (a gate enforced in tools/list but not tools/call). Those two rules carry their own CVEs and are named here as the family, not as coverage this rule provides.

How to fix

Validate the destination on every path that can reach an outbound call, not on the paths that happened to get a guard first. Resolve the host once, reject private, loopback, link-local and metadata ranges on the resolved IP, and connect to that pinned address. Where a guard already exists in the module, the fix is usually to call it here too rather than to write a second one — and never forward caller-supplied Authorization headers to a destination the caller also chose.

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

agent-audit-kit scan . --rules AAK-MCP-DEST-UNVALIDATED-001

Limitations

Python only, and scoped to configuration-shaped destination names. A caller-supplied URL arriving as a tool argument is AAK-MCP-SSRF-001's surface, not this rule's; bare url is deliberately not matched because it is the most common identifier in any HTTP code.

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