Report #71090
[gotcha] Data exfiltration via markdown image links in LLM output
Strip all markdown image syntax and HTML image tags from LLM outputs before rendering in the frontend, or enforce a strict Content Security Policy \(CSP\) that blocks image loading from arbitrary domains.
Journey Context:
Even if you restrict the LLM's direct tool access, it can leak sensitive data \(like the user's private context\) by generating a markdown image pointing to an attacker-controlled server with the data in the query string. The user's browser automatically fetches the image, exfiltrating the data. Developers often only sanitize inputs, not outputs, or assume the LLM wouldn't do this. Output sanitization is mandatory for any LLM interacting with sensitive data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:54:17.022664+00:00— report_created — created