The lethal trifecta is a name for the three abilities that, when one AI agent has all of them, let an attacker steal your data through prompt injection: access to private data, exposure to untrusted content, and a way to send information out.
Simon Willison coined the term in a June 16, 2025 post. It's become one of the most useful shortcuts in AI security, because it turns a fuzzy worry into a checklist you can run against any agent.
The three parts of the lethal trifecta
Willison describes the ingredients like this:
- Access to private data. Your inbox, files, private repos, customer records. He points out that reading private data is one of the main reasons people give agents tools at all.
- Exposure to untrusted content. Any way text or images written by someone else can reach the model. A web page, an email, a GitHub issue, a shared document.
- The ability to communicate externally. Anything that can carry data out: sending email, making HTTP requests, opening a pull request, even rendering an image from a URL.
Each one on its own is manageable. The danger comes from the combination. In his words, "Any time you combine those three lethal ingredients together you are ripe for exploitation."
Why the combination is so dangerous
Language models follow instructions they find in content, not only instructions from the person using them. Willison notes that models can't reliably tell instructions apart based on where they came from.
So if an agent reads an attacker's web page (part 2), the page can tell it to fetch something private (part 1) and send it somewhere (part 3). The user never typed anything harmful. The outcome isn't guaranteed either, since models are non-deterministic, which makes these bugs easy to miss in a quick test.
This isn't theoretical. Willison lists products where researchers reported this class of exploit, including Microsoft 365 Copilot, GitHub's official MCP server and GitLab's Duo chatbot, plus a long list of earlier cases. Most were fixed by closing the exfiltration path rather than by stopping the injection itself.
MCP makes it easy to assemble by accident
The Model Context Protocol lets people plug tools from different sources into one agent. Willison argues this is exactly how the trifecta gets built without anyone meaning to. You add an email tool, a web browsing tool and a file tool, and you've got all three parts.
Sometimes a single tool has all three. His example is the GitHub MCP exploit: the agent read public issues anyone could file, could see private repos, and could open pull requests that leaked what it found.
Why guardrails don't close it
Some vendors sell filters that claim to catch most injection attempts. Willison's view is blunt: in web application security, catching 95% of attacks is a failing grade, because attackers keep trying until something gets through. He also says nobody yet knows how to prevent this with 100% reliability.
That's why the safest move is structural. Remove one leg of the trifecta and the attack has nowhere to go.
How to break the trifecta
A Martin Fowler article by Korny Sietsma turns the idea into practical mitigations. Here's a condensed version:
- Cut private data access. Use read-only tokens, keep production credentials out of files the agent can read, and skip tools that read sensitive data you don't need.
- Block outside communication. The article warns that any internet access can be used to exfiltrate, so restricting just email or chat isn't enough.
- Limit untrusted content. Allow-list the sources the agent may read and block the rest.
- Split the task. Break work into stages so no single stage holds all three parts.
- Sandbox and review. Run agents in containers, and have a person review what each stage produces.
For developers building agents, Willison points to two research directions: the design patterns paper and Google DeepMind's CaMeL. Both constrain what an agent can do after it reads untrusted text.
A quick trifecta audit
For each agent or chatbot you run, answer three yes or no questions:
| Question | Leg |
|---|---|
| Can it read anything private? | Private data |
| Can anyone other than the user put text in front of it? | Untrusted content |
| Can it send data anywhere, including by loading a URL? | External communication |
Three yeses means you should assume an injection can leak data. Then test it: plant one of our harmless canary payloads in the untrusted content and see whether the agent follows it. If it does, the third leg is what decides how bad that is. Our post on markdown image exfiltration covers the most common way data leaves.
Next step: run your agent's inputs through the canary tests on the home page and see which legs of the trifecta it actually has.