Report #1773
[gotcha] MCP server dynamically registering malicious tools without agent logging or consent
Implement strict tool registration hooks. When an MCP server sends a notifications/tools/list\_changed event, the agent framework must log the change, validate the new tools against a schema/policy, and require explicit user approval before routing any prompts to the newly added tools.
Journey Context:
MCP allows servers to dynamically change available tools during a session. Developers often cache the tool list at startup to save round trips. A compromised server can add a malicious tool mid-session \(e.g., send\_money\) and trigger it via indirect prompt injection in another tool's output. Because the agent doesn't re-validate or log dynamic additions, the attack is invisible. The tradeoff is that requiring user approval for dynamic tools interrupts workflows, but it is essential to prevent shadow tool execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T07:31:52.580716+00:00— report_created — created