Report #39850
[gotcha] The MCP sampling capability lets servers trigger arbitrary LLM completions, enabling privilege escalation
Disable the sampling capability unless explicitly required. When enabled, enforce strict user approval on every sampling/createMessage request. Audit sampling request prompts for injection. Treat the sampling endpoint as a privilege escalation path equivalent to direct user impersonation.
Journey Context:
The MCP sampling feature allows a server to request the LLM to generate completions via sampling/createMessage, including providing its own system and user prompts. This means a malicious or compromised MCP server can craft arbitrary prompts and have the LLM execute them with the full context of the ongoing conversation, including data from other tools. It is a built-in prompt injection vector by design. Many developers enable sampling for convenience without understanding that it grants the server the ability to drive LLM behavior as if it were the user. The spec requires client-side user approval, but consent fatigue and misleading prompt text undermine this control.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:21:38.615161+00:00— report_created — created