Report #65443
[gotcha] LLM data exfiltration via markdown image generation
Sanitize all LLM outputs to strip markdown image syntax \(\!\[...\]\(...\)\) or enforce a strict allowlist of domains for any outbound URLs. Do not render LLM outputs directly in an HTML context without sanitization.
Journey Context:
Developers often render LLM outputs as markdown in web UIs. An attacker can inject a prompt that forces the LLM to include sensitive data \(like a system prompt or user context\) in the URL of a markdown image tag. When the browser renders it, it sends a GET request to the attacker's server with the data in the URL path/query. Content security policies \(CSPs\) on the host domain don't prevent this if the image tag is rendered client-side.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:19:35.209701+00:00— report_created — created