AAK-MCP-TOOLGATE-ASYMMETRY-001: MCP tool gate enforced in tools/list but not tools/call
- Severity
- HIGH
- Category
- MCP Configuration (
mcp-config) - Scanner
agent_audit_kit/scanners/mcp_toolgate_asymmetry.py- Auto-fixable
- No.
- SARIF name
McpToolGateAsymmetry
What it detects
An MCP server gates tools by an allowlist / read-only / non-destructive control (e.g. ALLOWED_TOOLS, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS, a *READONLY* / *NON_DESTRUCTIVE* env var or config) and applies that check in the tool-discovery handler (tools/list / list_tools / ListToolsRequestSchema) but NOT in the execution handler (tools/call / call_tool / CallToolRequestSchema). A client that skips discovery and calls a hidden tool name directly bypasses the control entirely — the gate is cosmetic. This is the CVE-2026-46519 class (mcp-server-kubernetes < 3.6.0 documented three env vars as access controls but enforced them only at the discovery layer; CWE-863 Incorrect Authorization, CVSS 8.8). This is an enforcement-layer asymmetry — distinct from AAK-MCPWN-001, which is a transport-middleware route asymmetry (/mcp_message vs /mcp). Do not conflate the two.
How to fix
Enforce the same allowlist / read-only / non-destructive check inside the tools/call (execution) handler, not only in tools/list (discovery). Authorization must gate the action, not just its visibility — a denied tool must raise in the call path even when the client never listed it. Centralise the check (e.g. a shared assert_tool_allowed(name) called at the top of the call handler) so discovery and execution cannot drift apart.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-TOOLGATE-ASYMMETRY-001
Limitations
In Python it compares the bodies of the functions named or decorated list_tools and call_tool (or dispatch, execute, run or invoke tool) for a fixed list of gate words (allowed_tools, allow_only, read_only, readonly, non_destructive, destructive_tools, disable_destructive). The gate has to be named in the list handler itself, so filtering done in a helper it calls, or under another name such as TOOL_ALLOWLIST, is not seen, and any mention of a gate word in the call handler, a log line included, counts as enforcing it.
References
- CVE: CVE-2026-46519, CVE-2026-77243
- OWASP MCP Top 10: MCP07:2025 (Insufficient Authentication & Authorization)
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation)
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-TOOLGATE-ASYMMETRY-001.md: the page then shows that text, with the registry reference appended under it.