threatdeck
Live 13:45 UTC ·

Learn / AI security fundamentals

Lesson 2 of 59 minReviewed

The lethal trifecta and the Agents Rule of Two

Use two short design tests to decide whether an injected instruction can steal data or cause damage in a given agent, and which capability to remove or gate.

Lesson 1 established that anyone whose text reaches the model can steer it. That is not exploitable on its own: injected text needs something worth stealing and a way to act. Two widely cited tests make this concrete.

The lethal trifecta

In June 2025 Simon Willison described three capabilities that, combined in one agent, let an attacker trick it into handing over private data: access to private data, exposure to untrusted content, and the ability to communicate externally [1]. The exfiltration channel can be an HTTP request made by a tool, an image the client loads, or a link the user is invited to click, and he notes such channels are almost limitless [1]. Rendering a markdown image whose URL carries data is the classic case: Johann Rehberger showed it leaking chat data from Bing Chat in 2023 [2].

The lethal trifecta and the Agents Rule of Two Three overlapping circles: access to private data or sensitive systems, exposure to untrusted content, and the ability to communicate externally or change state. Any two can be designed safely; where all three overlap an injected instruction can steal data or take harmful actions, so the agent needs a human approval or must drop one property. Private data or sensitive systems Rule of Two [B] Untrusted content web, mail, issues Rule of Two [A] External communication or any state change Rule of Two [C] all three: exploitable Pick at most two per session, or add a human approval.
Each property is useful on its own. The overlap of all three is where an injection becomes a breach.

The Agents Rule of Two

Meta's Agents Rule of Two (October 2025) generalises the test. Within one session an agent should have no more than two of: [A] processing untrustworthy inputs, [B] access to sensitive systems or private data, [C] the ability to change state or communicate externally. If a task needs all three, the agent should not run autonomously; it needs supervision such as human approval or another reliable validation step [3]. Willison points out the difference that matters: the trifecta covers data exfiltration, while property [C] adds any change of state, such as deleting records or merging code [4].

Two incidents with no buggy component

Where the legs were in two public cases
CaseUntrusted inputPrivate dataOutbound action
GitHub MCP (Invariant Labs, May 2025)An issue filed on the user's public repositoryThe user's private repositories, reachable through the same tokenA pull request on the public repository containing the private data
EchoLeak, CVE-2025-32711 (Microsoft 365 Copilot)Content Copilot processed on the user's behalfThe user's Microsoft 365 dataInformation disclosure over the network

In the GitHub case Invariant stresses that the flaw was not in the GitHub MCP server code: every tool worked as designed, and the agent combined them after reading the malicious issue [5]. The demo client asked for confirmation on each tool call, but users commonly choose to always allow [5]. Microsoft classified EchoLeak as AI command injection that let an unauthorised attacker disclose information over a network [6].

Applying the tests in a design review

  1. List every tool and data source the agent can reach in one session, including MCP servers a user may add later.
  2. Mark each as A (untrusted input), B (sensitive data or system) or C (outbound or state-changing). A tool that reads email is both A and B; a web fetch tool is both A and C.
  3. If A, B and C are all present, pick a fix: remove a leg (no outbound network, read-only access), split the work into sessions that each hold at most two, or place a human approval before every C action that follows untrusted input.
  4. Write the decision down so a later feature request that adds a tool triggers the review again.

Splitting sessions works because the property that matters is what is combined in one context window. A plan-then-execute or dual-model design, covered in the next path, applies the same idea inside one application. For end users who mix MCP servers themselves, Willison's conclusion is blunter: the only safe option is to avoid the combination entirely [1].

Try it on ThreatDeck

Self-check

4 questions

Pick an answer to see whether it is right and why. Only your score is saved, in this browser.

  1. Which combination makes an agent exploitable for data theft under the lethal trifecta?
  2. What does the Agents Rule of Two add compared with the lethal trifecta?
  3. In the GitHub MCP case, why could GitHub not fix the issue with a server patch?
  4. A support agent reads customer emails, queries the CRM and can issue refunds. Which change satisfies the Rule of Two without a human in the loop?

References

  1. The lethal trifecta for AI agents: private data, untrusted content, and external communication. Simon Willison, 2025-06-16.
  2. Bing Chat: Data Exfiltration Exploit Explained. Johann Rehberger, Embrace The Red, 2023-06-18.
  3. Agents Rule of Two: A Practical Approach to AI Agent Security. Meta AI, 2025-10-31.
  4. New prompt injection papers: Agents Rule of Two and The Attacker Moves Second. Simon Willison, 2025-11-02.
  5. GitHub MCP Exploited: Accessing private repositories via MCP. Invariant Labs, 2025-05-26.
  6. CVE-2025-32711: M365 Copilot Information Disclosure Vulnerability. NIST NVD (CNA: Microsoft), 2025-06-11.
Completing the self-check also marks the lesson complete. Saved in this browser only.

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.