Data Exfiltration via AI Agents: Markdown Image Rendering and Other Covert Channels
A lot of AI security research focuses on getting a model to say something it shouldn't. A quieter, arguably more dangerous category of technique doesn't care what the model says at all — it uses the agent's own normal, intended behavior as a covert channel to smuggle sensitive data out to an attacker, often without producing any output a human reviewer would find obviously suspicious. The best-documented version of this exploits how chat interfaces render markdown-formatted image links, but the underlying pattern generalizes well beyond that one specific mechanism.
The markdown image rendering mechanism, explained
Many chat interfaces built on top of LLMs automatically render markdown syntax in the model's output — bold text, links, and, critically, images specified with syntax like an exclamation mark followed by bracketed alt text and a parenthetical URL. When the interface encounters this syntax in the model's response, it doesn't just display the literal text — it actually makes an HTTP request to fetch the image from the specified URL and renders it inline, exactly the way a web browser would fetch and display any embedded image.
This creates a direct, if narrow, network egress path controlled by whatever text the model generates. If an attacker can get the model to include, in its markdown-formatted output, an image tag pointing to a URL they control, with sensitive data encoded into that URL as a query parameter, the act of the interface simply rendering the model's response — completely normal, expected behavior with no jailbreak or policy violation required — triggers a request to the attacker's server carrying that data with it. The user sees what looks like a broken or missing image icon, if they notice anything at all. The attacker's server sees the exfiltrated data arrive in its request logs.
Why this doesn't require the model to say anything harmful
This is precisely what makes this technique category distinct from, and in some ways more concerning than, most jailbreak research covered elsewhere: it doesn't require bypassing the model's safety training in any conventional sense at all. Generating a markdown image tag is completely normal, benign behavior that any model is entirely willing to do as part of ordinary formatting — there's no refusal to bypass, because nothing about generating markdown syntax looks remotely harmful to the model's own safety evaluation of what it's producing. The harm isn't in what the model says; it's in the side effect of the interface faithfully rendering what the model said, which is a property of the surrounding application architecture, not of the model's judgment at all.
This means testing an application purely for jailbreak resistance — whether the model can be convinced to say harmful things — will systematically miss this entire category of risk, because a system can be extremely well-defended against every jailbreak technique in this series and remain completely exposed to this one, since the exploit doesn't route through the model's refusal behavior at any point.
How the data actually gets into the model's output
The exfiltration mechanism needs a delivery method to get the model to generate the malicious image tag with real sensitive data embedded in the URL in the first place, and this is where it connects directly back to prompt injection. An attacker plants an instruction — via a direct message, or more dangerously via indirect injection through a document, email, or other content the agent processes — telling the model to summarize the current conversation or retrieved data and include the summary as a URL parameter in a markdown image tag pointing to an attacker-controlled domain, often disguised as something plausible like a tracking pixel, an analytics callback, or a broken-looking utility image.
Because the actual harmful content — the exfiltrated data — is packaged inside what looks like an ordinary formatting element rather than expressed as visible, readable text, it's far less likely to trigger a human reviewer's suspicion even if they happen to glance at the raw output, and far less likely to be caught by output filters specifically looking for harmful language, since there's no harmful language present in the conventional sense at all.
Other covert channels beyond markdown images
Markdown image rendering is the best-documented and most widely discussed instance of this technique category, but it's a specific example of a broader pattern worth understanding independently: any feature that causes an application to take an automatic action based on content the model generates — fetching a URL, rendering a link preview, triggering a webhook, executing an embedded script in a permissive rendering context — is a potential covert exfiltration channel if the model can be induced to generate content that triggers it with attacker-controlled parameters.
Other documented and plausible variants include exfiltration through hyperlinks a user might be socially engineered into clicking (with sensitive data embedded in the URL, relying on the user's own click rather than automatic rendering), exfiltration through any auto-fetching preview functionality for links or embeds, and, in more permissive environments, exfiltration through any output that gets passed to a downstream system capable of making its own outbound network requests based on that output. The specific mechanism varies by application; the underlying pattern — using an unrelated, intended feature as an unintended data-egress path — is consistent across all of them.
Why this is especially dangerous for agents with access to sensitive data
The severity of this technique scales directly with what data the agent has access to in its context at the time of the attack. An agent summarizing public information has little of value to exfiltrate through this channel even if fully compromised. An agent with access to a user's private conversation history, retrieved confidential documents, API keys or credentials passed into its context for legitimate operational reasons, or personally identifiable customer data is a genuinely high-value target, because a successful exfiltration attack can extract exactly that sensitive context without ever needing to jailbreak the model into producing an overtly harmful response — it just needs the model to format a summary of that data as part of a URL, which is a much lower bar to clear than convincing it to explicitly violate a safety policy.
Testing for this technique family
A real assessment for this risk needs to go beyond checking whether the model refuses to explicitly leak data when asked directly — that's testing the wrong layer entirely. It needs to test whether the application's own rendering and auto-fetch behavior can be triggered with attacker-controlled parameters, which means actually attempting to get the model to generate markdown image tags, links, or other auto-triggering content pointing to a test-controlled endpoint, then verifying whether the application environment actually fetches or renders it, and whether real sensitive data from the agent's context can be successfully embedded in that outbound request.
This is one of the technique categories where the finding is as much about the application's rendering behavior as it is about the model's willingness to generate the payload — a model that happily generates the malicious markdown tag is only a real vulnerability if the surrounding application actually renders it in a way that triggers an outbound request. Testing needs to cover both halves of that chain, since a fix at either layer (the model refusing to generate the payload, or the application refusing to auto-render untrusted content) closes the vulnerability.
Mitigations that address the actual mechanism
The most direct fix operates at the application layer rather than relying on the model to refuse to generate the payload: disabling automatic rendering of externally-loaded content (images, link previews, embeds) in contexts where the content being rendered originated from model output rather than from a fully trusted, static source, or routing any such rendering through a strict allowlist of trusted domains rather than rendering arbitrary attacker-controlled URLs. Content Security Policy controls, familiar from traditional web application security, apply directly here and are an underused defense in many LLM application front ends that were built quickly without importing the web security practices that would normally govern rendering untrusted content.
Output filtering that specifically inspects generated content for URL patterns before rendering — flagging or stripping markdown image and link syntax pointing to domains outside an approved list — adds a second layer of defense that doesn't depend on the model's own judgment at all, which is exactly the right property for a defense against a technique that doesn't route through the model's judgment in the first place.
Why this category deserves more attention than it typically gets
Data exfiltration through rendering side effects tends to be underrepresented in AI security discussions relative to its actual severity, largely because it doesn't fit the mental model most people bring to "AI safety" — it's not about the model saying something offensive or dangerous, so it doesn't trigger the same intuitive alarm as a jailbreak does. But for any organization whose AI agent has access to genuinely sensitive data, this technique category represents one of the most direct, high-impact paths to a real data breach, precisely because it can succeed without the model ever producing output that looks harmful to a human observer, an automated content filter, or the model's own safety training. Treating this as a core part of any serious AI security assessment — not an afterthought — is warranted by how quietly effective it can be.
How this technique was actually discovered and disclosed
This exfiltration pattern was first widely documented by independent security researchers testing popular consumer chat applications shortly after markdown rendering became a standard feature across major LLM interfaces, and it followed a familiar and healthy disclosure pattern: researchers identified the technique, reported it to the affected vendors, and vendors responded with fixes — typically disabling automatic image rendering for untrusted domains, or requiring explicit user confirmation before fetching external images referenced in model output. The pattern of discovery is itself informative: this wasn't a theoretical concern raised by AI safety researchers reasoning abstractly about possible risks, it was found through the same kind of hands-on adversarial testing that uncovers vulnerabilities in any other software category, by people specifically looking for ways an LLM application's features could be turned against its own users.
That several major consumer AI products were found vulnerable to some version of this technique after already being in wide production use is a useful data point on its own: this isn't an obscure, theoretical edge case that only shows up in unusually permissive custom-built applications. It's a realistic risk in mainstream, widely used products, discovered only because someone specifically tested for it rather than assuming standard markdown rendering was a purely cosmetic, security-neutral feature.
Why this technique category will keep evolving
As vendors patch the specific, well-documented markdown-image variant, the underlying pattern — using any auto-triggering rendering or fetch behavior as a covert channel — will very likely keep finding new expressions as LLM interfaces add new rich-content features. Any future feature that causes an application to automatically act on model-generated content without an explicit user action in between is a candidate for the same fundamental exploitation pattern, whether that's a new embed type, a new integration that auto-triggers based on detected content, or a new agentic capability that takes automatic action based on generated text.
This argues for a general design principle rather than a narrow, feature-specific fix: any application feature that causes automatic, unconfirmed action based on model-generated content deserves security review specifically for covert-channel potential before it ships, rather than waiting for a researcher to discover the specific exploitation path after the fact. Treating this as a standing category to evaluate for every new feature, rather than a one-time patch applied to the original markdown-image finding, is the difference between closing one instance of the pattern and building resilience against the pattern itself.
How this connects to broader data loss prevention thinking
Organizations with a mature traditional data loss prevention program already have relevant infrastructure and practices that extend naturally to this risk, once the connection is made explicit. Network-level egress monitoring — watching for outbound connections to unfamiliar or suspicious destinations, a standard control in many enterprise environments — can catch this exfiltration technique in progress, since the attack fundamentally depends on an outbound request reaching an attacker-controlled endpoint, which is exactly the kind of event traditional egress monitoring is built to detect regardless of what generated the request in the first place.
The practical gap in most organizations isn't a lack of relevant tooling, it's a lack of awareness that AI agent infrastructure needs to be included within the scope of existing data loss prevention and egress monitoring programs, rather than treated as a separate, disconnected system exempt from controls that already apply everywhere else in the environment. An organization that has invested seriously in traditional DLP but treats its AI agent's outbound network activity as outside that program's scope has a real, specific gap that this technique category can walk directly through, despite the organization otherwise having genuinely mature data protection practices.
Extending existing DLP and egress monitoring to explicitly cover AI agent infrastructure — treating the agent's runtime environment as just another system whose outbound traffic deserves the same scrutiny as any other production system handling sensitive data — is a comparatively low-effort way to gain real defense against this technique, precisely because it reuses infrastructure and expertise the organization already has, rather than requiring an entirely new security capability built from scratch specifically for AI systems.
The core lesson to take away
The throughline across this entire technique category is worth stating plainly as a closing point: not every serious AI security risk looks like a jailbreak, and not every serious AI security risk requires the model to say something it shouldn't. Some of the most quietly dangerous vulnerabilities live entirely in the gap between what the model generates and how the surrounding application chooses to act on that output, automatically, without a human in the loop. Testing a model's safety behavior in isolation, however thoroughly, will never catch this category — it requires testing the full system, rendering behavior and all, exactly the way a real attacker would encounter it.
For any organization building or buying an AI-powered chat interface with rich content rendering, adding this specific technique category to a standing security checklist — reviewed every time a new rendering or auto-fetch feature ships, not just once at initial launch — is a small, durable investment against a technique that has already proven itself effective against mainstream, widely used products in the real world, and one that costs considerably less to build in from the start than to retrofit after a real data breach has already made the case for it.
It's worth closing on the specific reason this category deserves a permanent line item in any AI application security review, rather than a one-time check: new rich-content and auto-action features ship continuously as chat interfaces compete on capability, and each one is a fresh opportunity for the same fundamental pattern to resurface in a form nobody has specifically tested for yet. A security process that reviews this risk category once, at initial launch, and never revisits it as new features ship, will reliably fall behind the application's own growing feature surface — treating this as an ongoing, standing review requirement rather than a launch-day checkbox is the only approach that keeps pace with how quickly these interfaces tend to add new capabilities.
Want to know whether your own agent holds up against techniques like these?
Run a Free Mini Assessment