Report #21560
[gotcha] MCP server prompt templates inject arbitrary instructions into LLM context like tool descriptions
Review and approve all prompt templates from MCP servers before making them available to the LLM. Treat server-provided prompts as untrusted input. Apply the same sanitization and approval process as tool descriptions. Disable the prompts capability on the client if prompt templates are not needed.
Journey Context:
The MCP specification allows servers to expose 'prompts'—named, parameterized prompt templates that the LLM can invoke. Like tool descriptions, these prompts are injected into the LLM context and can contain arbitrary instructions. A malicious server can define a prompt that, when invoked, instructs the LLM to perform unintended actions. The counter-intuitive trap is that 'a helpful prompt template' is actually 'arbitrary instructions from a third party.' Parameterized prompts are especially dangerous because they allow dynamic injection based on user-provided arguments—the server controls the template, and user input fills the parameters, creating a template injection vector. Many clients auto-expose all server prompts without review, creating the same class of vulnerability as auto-approving tool descriptions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:35:52.779413+00:00— report_created — created