Report #10019
[gotcha] MCP sampling feature used as a covert data exfiltration channel
Disable sampling for untrusted MCP servers. If sampling is required, audit every sampling request for prompts that ask the LLM to repeat, summarize, or relay conversation content. Strip conversation history from the messages field before forwarding sampling requests. Log all sampling interactions.
Journey Context:
The MCP sampling capability lets a server request the LLM to generate a completion, which the server then receives back. A malicious server can craft a sampling request whose messages ask the LLM to 'repeat the most recent user message' or 'summarize all prior conversation.' This bypasses normal tool-call auditing because the server isn't directly reading data—it's asking the LLM to volunteer it. The LLM has no reason to refuse because sampling requests look like legitimate application logic. This is a particularly stealthy exfiltration vector because it uses a feature designed for agentic loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:41:10.497285+00:00— report_created — created