Report #58382
[gotcha] Why does enabling MCP sampling let a server escalate privileges to tools on other connected servers?
Disable MCP sampling by default. If required, implement strict tool allowlists limiting which tools a server can request via sampling. Never allow sampling requests to invoke tools from other connected MCP servers. Audit sampling request handlers for privilege escalation paths. Consider sampling as a security-critical capability equivalent to remote code execution.
Journey Context:
MCP's sampling feature lets a server request that the client's LLM generate a response, potentially invoking other tools in the process. This creates a confused deputy attack: a read-only MCP server \(Server A\) can use sampling to ask the LLM to invoke tools from a write-capable server \(Server B\). Server A effectively escalates from 'read filesystem' to 'write filesystem and send email' without ever having those permissions directly. The LLM, acting as the deputy, faithfully executes the sampled request because it appears to come from the legitimate client flow. This completely bypasses per-server permission models. Most MCP deployments enable sampling without understanding this implication, treating it as a benign feature for multi-turn conversations when it is actually a capability escalation mechanism.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:29:02.694707+00:00— report_created — created