Prompt injection is a confused-deputy problem
EchoLeak let a single email make Microsoft 365 Copilot leak internal data, past the classifiers built to stop it. A teardown, and why the fix is privilege design rather than better filters.
In June 2025, researchers at Aim Security disclosed EchoLeak, a flaw in Microsoft 365 Copilot that let an attacker extract internal data by sending one email. The victim did not have to open it or click anything. They only had to ask Copilot an ordinary question later.
Microsoft rated it critical, with a CVSS score of 9.3, assigned CVE-2025-32711 and fixed it server-side in May 2025, after the researchers reported it in January; according to Aim, no customers were affected. There is no need to dwell on Microsoft: the same pattern applies to almost every assistant that reads untrusted content and has access to private data. What makes EchoLeak worth studying is that it got through defenses designed specifically to stop it.
How the chain worked
Based on the public write-ups, the attack combined several small weaknesses, none catastrophic on its own:
- Untrusted content entered the context. Copilot retrieves relevant emails to answer questions, including emails from outside the company.
- The classifier was talked past. Microsoft’s cross-prompt injection (XPIA) classifiers screen for instructions aimed at the AI. The email was phrased as if addressed to the human recipient, so it did not look like an attack.
- The model followed it anyway. Once retrieved, the text was treated as instructions: find sensitive information in the user’s context and embed it in a link or image reference.
- An allowed channel carried the data out. Link redaction and content security policy were bypassed through reference-style markdown and URLs on Microsoft domains the policy trusted, so the data left in an outbound request.
Each step was blocked by some control in principle. Each control was a filter on content, and each filter had a phrasing it did not anticipate.
Every control in the chain was a filter, and every filter had a phrasing it didn’t anticipate.
The confused deputy
Security engineering has a name for this situation, coined in 1988: the confused deputy. A program holds privileges on behalf of one party and is tricked by another party into using them. The deputy is not malicious; it simply cannot tell whose instructions it is following.
An AI assistant is a near-perfect confused deputy. It holds the user’s privileges (their mail, files, chats) and it reads text from anyone (inbound email, shared documents, web pages). A language model has no reliable way to separate data from instructions, because to a model both are just text.11Aim Security described EchoLeak as an “LLM scope violation”: content from an untrusted scope causing access to a privileged one. Filters try to detect malicious text, but the space of phrasings is unbounded and the attacker only needs one.
Controls that hold when filters fail
Keep the classifiers; they raise the cost of attacks. But design as if they will be bypassed, and put the real controls on privilege and output channels.
| Control | What it limits | EchoLeak step it breaks |
|---|---|---|
| Scope separation | Untrusted content cannot be retrieved into a session that also reads privileged data | 1 |
| Least-privilege tools | The assistant gets only the data and actions this task needs | 3 |
| Egress control | No model-generated URLs, images or requests to anywhere not explicitly allowed | 4 |
| Approval gates | Sending, sharing, paying or deleting requires a human confirmation outside the model | 4 |
| Provenance labels | Content carries its source, so policies can treat external text differently | 1–3 |
Egress deserves particular attention because it is the cheapest effective control. If the assistant cannot make outbound requests or render resources from arbitrary locations, stolen data has nowhere to go. Many exfiltration techniques reported since 2023 rely on a rendered image or link, which is why the question “what can this assistant cause a browser to fetch?” belongs in every design review.
Questions to put to every AI vendor
Most companies will meet this risk first in products they buy, not in systems they build. EchoLeak happened in one of the most scrutinized AI products on the market, so assume the question is relevant to every vendor. Five questions separate a serious answer from a brochure:
- Which untrusted sources can your assistant read, and can we switch each one off?
- Can content from an external sender ever be combined with our internal data in the same response?
- What can the assistant cause a browser or server to fetch, and is there an allow-list we control?
- Which actions can it take without a human confirmation outside the model, and can we require one?
- How quickly do you notify customers of AI-specific vulnerabilities, and what logs will we get to investigate impact?
Vague answers are informative. A vendor that responds only with “our classifiers detect prompt injection” is describing the layer EchoLeak walked past. You want answers about scope, privilege and egress, and a commitment on disclosure in the contract.
Checking your own systems
For each AI assistant or agent you run or buy, map two lists and look at where they meet:
- What untrusted text can reach it? Inbound email, support tickets, uploaded files, shared documents, web pages, third-party API responses.
- What can it reach on the user’s behalf? Internal documents, customer records, the ability to send, post, pay or change settings.
Any system where both lists are long is a confused deputy waiting for a creative attacker. The fix is rarely to drop a feature; it is to split sessions, narrow tool scopes, block uncontrolled egress and require confirmation for actions that matter. For vendor products, ask the vendor these same questions and get the answers in writing.
When this applies to you
You run or are buying AI assistants that read external content (email, tickets, documents, the web) and also have access to internal data or actions.
In a Strategy & Architecture Audit we map untrusted inputs against privileges for your systems and design the scope, egress and approval controls that keep them safe when filters fail.
/ Sources
