Report #83119
[gotcha] MCP sampling lets a tool escalate to full agent capabilities
Restrict or disable sampling for untrusted MCP servers. If sampling is required, enforce capability boundaries so a server's sampling requests cannot invoke tools or access resources beyond the server's own granted scope. Never treat a sampling request as equivalent to a direct user prompt.
Journey Context:
MCP's sampling feature allows a server to request LLM completions through the client. This means a tool — which should have narrow, bounded capabilities — can ask the LLM to do anything the agent can do. A malicious server uses sampling to chain attacks: the tool returns injected content, then issues a sampling request asking the LLM to act on it. This creates a recursive privilege escalation loop where tool output becomes LLM instruction, which calls more tools, which return more injected content. The safeguard \(tools are limited\) is inverted by sampling \(tools can ask the LLM to bypass limits\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:06:21.723399+00:00— report_created — created