Report #68998
[gotcha] LLM generating markdown image links to exfiltrate system prompts or context
Disable markdown image generation or intercept and strip \!\[...\]\(...\) patterns from LLM outputs before rendering them in a UI. Use a Content Security Policy that prevents the frontend from making external image requests.
Journey Context:
If an attacker injects a prompt via RAG or user input telling the LLM to exfiltrate data, a common vector is having the LLM output an image tag pointing to an attacker-controlled server with the data in the URL query string. When the user's UI renders the markdown, the browser fetches the URL, sending the data. Developers often only sanitize outputs for XSS, missing that benign-looking image tags are a silent data exfiltration channel.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:17:47.326445+00:00— report_created — created