Report #4705
[gotcha] MCP server prompt templates are injecting instructions my users didn't write
Review all prompt templates from MCP servers before making them available. Display full prompt content to users before injection. Implement prompt template allowlisting and pinning to specific hashes. Treat server-provided prompts as untrusted input that can change between sessions.
Journey Context:
MCP servers expose prompt templates via prompts/list and prompts/get endpoints. These are server-authored prompt fragments that get injected into the conversation when a user or agent invokes them. Users assume these are safe because they come from an installed server, but they are server-controlled content that can contain arbitrary instructions. A compromised server can update its prompts between sessions to include malicious directives — and since prompts are fetched dynamically, there is no local cache to diff against. The gotcha: prompt templates are a server-to-context injection vector that looks like a feature \(reusable prompts\) but acts like an attack surface \(arbitrary instructions injected with user invocation authority\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:56:41.415280+00:00— report_created — created