The dangerous combination: data, input and actions
Why an AI agent with private data, untrusted input and the ability to communicate externally can be hijacked, how to score your own setup in 2 minutes and how to remove one leg.
In short
An agent only becomes truly dangerous when it has three things at once: access to your private data, untrusted input (email, web pages, issues) and a way to communicate externally or change something. Simon Willison calls this the lethal trifecta; Meta's Agents Rule of Two says: at most two of the three per session. Remove one leg and the route by which your data leaks out is closed.
- Intermediate
- 6 min
- free
- Fact-checked on 2 November 2026
- Completed
Agents read your email, your repos and the web, and more and more often they’re allowed to do things themselves. That means a stranger who can only send an email or an issue can make your agent work for them.
After this lesson you have: a score from 0 to 3 for your own agent setup, and you know which leg to remove to make it safe.
The three ingredients
Section titled “The three ingredients”Simon Willison described the lethal trifecta in June 2025. In October 2025 Meta turned it into the Agents Rule of Two: at most two of the three per session.
| Willison (trifecta) | Meta (Rule of Two) | Examples | |
|---|---|---|---|
| A. Input | “Exposure to untrusted content” | “can process untrustworthy inputs” | email, web pages, issues, PDFs, calendar invites |
| B. Data | “Access to your private data” | “access to sensitive systems or private data” | inbox, private repos, files, API keys |
| C. Action | “ability to externally communicate” | “can change state or communicate externally” | send email, open a PR, load a link, delete a file |
flowchart LR
AV["Attacker"] -.->|"plants instruction in<br/>email, issue or web page"| A["A. Untrusted input"]
A --> AG(("Agent"))
B["B. Private data<br/>inbox, repos, keys"] --> AG
AG --> C["C. External action<br/>email, PR, link, API call"]
C -.->|"data reaches<br/>the attacker"| AV
The model can’t reliably tell instructions and data apart. Willison: “we still don’t know how to 100% reliably prevent this from happening”. Your only real brake is breaking the circle.
Meta is stricter than Willison. For Meta, changing state also counts as leg C: deleting, paying, deploying. That doesn’t have to go outside to do damage. In April 2026 a Cursor agent wiped PocketOS’s production database plus backups in 9 seconds, with a token that was allowed “any operation”.
Two real examples
Section titled “Two real examples”| Incident | A. Input | B. Data | C. Action |
|---|---|---|---|
| GitHub MCP (Invariant Labs, May 2025) | an issue in a public repo | private repos via an overly broad token | a new PR in the public repo |
| EchoLeak (Aim Security, Jun 2025, CVE-2025-32711, CVSS 9.3) | an ordinary email in Outlook | Microsoft 365 Copilot searched email and SharePoint | data out in a URL, without a click |
GitHub MCP wasn’t down to a bug: “a fundamental architectural issue that must be addressed at the agent system level” (Invariant). Microsoft has fixed EchoLeak; no exploitation in the wild has been reported.
Score your own setup in 2 minutes
Section titled “Score your own setup in 2 minutes”Take one agent or chat assistant with connections, and answer one question per leg. Every “yes” is one point.
| Question | Yes if… |
|---|---|
| A. Does it read anything a stranger can write? | email, web search, issues/PRs, shared documents, calendar, messages in Telegram or WhatsApp |
| B. Can it access anything that isn’t public? | your inbox, private repos, your drive, .env files, a logged-in browser |
| C. Can it send something out or change something? | send emails or messages, post PRs or comments, load URLs or images, shell with network, delete files |
- 0-1: fine.
- 2: okay, but make sure you don’t unknowingly connect the third (a new MCP server or skill).
- 3: remove one leg today.
Three ways to remove a leg
Section titled “Three ways to remove a leg”- Remove input (A). Let the agent read only your own, trusted sources. Does it still need to process an email or web page? Have a separate session without tools and without data make a short summary of it, and pass on only that.
- Remove data (B). Give the agent its own, limited account or token: one repo with a fine-grained token, a separate mailbox, no
~/.sshor~/.awswithin reach. Invariant recommends: one repo per session. - Remove external action (C). Close off the network, except for a short allowlist. Codex runs with “network access turned off” by default. In the Claude Code sandbox,
sandbox.network.allowedDomainsstarts empty. Don’t give it the right to email or post on its own, or always have it confirmed by you.
Do you really need all three? Then Meta wants oversight, such as a human approving actions, or a new session in which the untrusted input is no longer present.
Checklist
0/5
Your progress is only stored in this browser.
Test yourself
1Your agent reads your inbox and may send emails. Which legs does it have?
An inbox is private data and untrusted input at the same time. Add sending and you have all three.
2What makes Meta's Rule of Two stricter than the trifecta?
That way destructive actions are covered too, such as the PocketOS database that was wiped in 9 seconds.
3Which measure removes leg C?
A technical boundary works even when the model is misled. A sentence in the prompt doesn't.
Next lesson: prompt injection in practice. What such an attack looks like and how to configure your agent.