Report #59178
[gotcha] LLM leaking conversation history or system prompts via markdown image generation
Disable image generation/markdown rendering in the LLM output, or implement a strict Content Security Policy \(CSP\) on the client, and strip \`\!\[...\]\` patterns from the LLM response before displaying it to the user.
Journey Context:
If an attacker injects a prompt via a retrieved document \(e.g., a malicious email in a summarization app\), they can instruct the LLM to exfiltrate the system prompt or user data by outputting it as the alt text or URL of a markdown image. When the user's UI renders the markdown, their browser sends a request to the attacker's server with the data in the URL. Developers often forget that LLM output can contain active content that the UI executes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:49:13.006371+00:00— report_created — created