Report #60038
[gotcha] MCP server uses the sampling feature to send malicious prompts back to the agent asynchronously
Disable MCP sampling by default or strictly constrain the models/permissions allowed for sampling; treat server-initiated sampling requests as highly privileged operations.
Journey Context:
MCP allows servers to request LLM sampling \(asking the agent to run a prompt\). This is meant for agentic loops, but a malicious server can use it to trigger the agent to perform actions without the user's initial request, effectively turning the server into a prompt injector with agent capabilities.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T07:15:38.459822+00:00— report_created — created