Agentic AI Security
The Lethal Trifecta as a Design-Review Test for AI Agents
Private data, untrusted content and a way to send data out: an agent holding all three in one context can be turned against its user. The combination as a design-review test, with three published cases and the controls that break each leg.
In June 2025, Simon Willison gave a name to a pattern that security researchers had been demonstrating for some time, most recently in the preceding weeks: “The lethal trifecta for AI agents: private data, untrusted content, and external communication.” His argument rests on one property of language models: “LLMs are unable to reliably distinguish the importance of instructions based on where they came from.” From that he draws the conclusion: “Any time you combine those three lethal ingredients together you are ripe for exploitation.”
I use the trifecta as a test in design reviews because it turns a vague risk, prompt injection, into a question an architect can answer from a diagram. For each agent and each context it runs in, does it hold all three capabilities at once? If it does, the design depends on the model never following an injected instruction, and no model offers that guarantee. The OWASP Top 10 for Agentic Applications, published in December 2025, makes the same assumption in its first entry, where it states that agents “cannot reliably distinguish instructions from related content.”
Three published cases show the same structure
The three cases below differ in product and severity. One is a fixed vulnerability in a commercial product; two are demonstrations by researchers. All three combine the same three capabilities in one context.
| Case | Private data | Untrusted content | Way out | Status |
|---|---|---|---|---|
| EchoLeak, Microsoft 365 Copilot | The user’s mail and documents | An external email | An image request through a domain the client trusted | Vulnerability, mitigated by Microsoft |
| GitHub MCP server | Private repositories the user could access | A malicious issue in a public repository | A pull request on the public repository | Researcher demonstration |
| Supabase MCP in Cursor | Database tables, read with a privileged role | A support ticket written by an attacker | The same ticket, which the attacker could read | Researcher demonstration on dummy data |
Source: Aim Labs and Microsoft (CVE-2025-32711, June 2025); Invariant Labs (26 May 2025); General Analysis (16 June 2025) and Supabase (16 September 2025). Mapping to the three legs is the author's.
EchoLeak is covered in an earlier review. The two demonstrations show how little the attacker needs once all three legs are present.
In the GitHub case, Invariant Labs showed an agent connected to the official GitHub MCP server reading a malicious issue in a public repository and then leaking data from the user’s private repositories into a public pull request. The researchers called it “a toxic agent flow,” and they were explicit that “this is not a flaw in the GitHub MCP server code itself, but rather a fundamental architectural issue.” Invariant noted that Claude Desktop asks the user to confirm each tool call by default, but that many users choose “Always Allow” and stop watching individual actions.
In the Supabase case, General Analysis built a support-ticket application in Cursor with the Supabase MCP server connected under the service_role key, which bypasses row-level security. A ticket from the attacker instructed the agent to read a table of integration tokens and post them back into the ticket, and the agent did. “No permissions were violated,” the researchers wrote. “The agent just followed instructions it should never have trusted.” Supabase later disputed the framing, noting that the elevated privilege came from the setup, and added read-only and project-scoped modes. It described its in-context guardrails, such as wrapping query results with warnings, as approaches that “reduced risk but did not eliminate it,” which is as much as I would claim for any mitigation that works inside the model’s context.
Break one leg per context, by design
The trifecta is useful because it tells an architect where to cut. Removing any one capability from a given context removes the attack path, and each leg can be removed or narrowed with controls that do not depend on the model’s judgment.
Source: Author's diagram, applying Simon Willison's lethal trifecta (June 2025) to agent design.
Reduce the private data in the context. The Supabase demonstration needed a role that could read every table. A read-only, project-scoped connection with row-level security in force would have limited what the injected instruction could reach. An agent that acts for a user should carry that user’s permissions, limited to the resources the task needs, and no broader service role. Invariant’s suggested mitigation for the GitHub case follows the same logic: one repository per session.
Separate untrusted content from private data. Some agents must read content written by outsiders: tickets, emails, issues, web pages. I design those as two contexts. The first reads the untrusted material with no access to private data and returns a structured result, such as a category, a summary in a fixed schema or a list of extracted fields. The second acts on that result with access to private data and never sees the original text, so the schema between the two contexts is what stops an injected instruction from crossing.
Close the way out. Exfiltration needs a channel, and agents often have more of them than a first inventory shows: tool calls that write to places others can read, rendered images and links, outbound HTTP requests, and even comments on tickets. Each channel needs an explicit decision. Egress goes through an allowlist the platform team owns; automatic rendering of links and images is off in contexts that contain untrusted content; and any tool that publishes data to a place outside the organization requires human approval of the actual content.
The test, applied in a review
The test fits on one page. For each agent, I ask the team to list every context the agent runs in, and for each context, to answer three questions:
- What private data can the agent read here, and under whose identity?
- Which inputs here can contain text written by someone outside the organization, including retrieved documents, tool outputs and messages from other agents?
- Which actions here can move data to a place someone outside the organization can read?
A context with answers to all three is a finding, and the fix is to change the architecture until one answer is empty. Classifiers and careful prompts still have a place as additional layers, but the three published cases show what happens when the model’s judgment is the only barrier.
The test has limits. It addresses data exfiltration, the outcome in all three cases above, and says less about agents that cause harm without sending data anywhere, such as an agent that deletes resources it was allowed to modify. Those cases call for the other half of the agent-security discipline: narrow tool permissions, budgets, approval for destructive actions and a tested way to stop the agent. The OWASP list covers those under tool misuse and rogue agents, and they deserve their own review.