Report #30958
[gotcha] Sensitive data exfiltrated through markdown image tags in tool returns
Sanitize all tool return payloads to strip markdown image syntax \(\`\!\[...\]\(\)\`\), HTML tags, and URL-based payloads before passing them back to the LLM or rendering them in the chat UI.
Journey Context:
A compromised MCP tool returns data containing \`\`. If the host UI renders this markdown/HTML, it triggers an HTTP GET, exfiltrating the data. Even if not rendered by the UI, the LLM might be instructed by a prior tool to output this markdown, achieving the same exfiltration when the user's client renders the final response.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:21:11.920559+00:00— report_created — created