AI Agent Security

The lethal trifecta for AI agents.

In June 2025, Simon Willison gave a name to a class of AI agent vulnerability that practitioners had been quietly worried about for months. Three capabilities that seem harmless in isolation. Combined, they let an attacker steal private data without touching your server — just by embedding instructions in content your agent reads.

The concept, from the source

Canonical source

“The lethal trifecta for AI agents: private data, untrusted content, and external communication”

simonwillison.net — June 16, 2025 →

Three legs. All three must be present.

Remove any one leg and the attack fails. The trifecta is what makes it lethal.

01PRIVATE DATA ACCESS

The agent can read sensitive things.

Email. Calendar. Files. Database records. Source code. Credentials. API responses. The agent has tools — read_file, query_db, list_emails — that return content the attacker wants to steal. This is almost universal in useful AI agents: the whole point of an agent is that it can take action and access context on your behalf.

02UNTRUSTED CONTENT

The agent processes content it didn’t write.

Emails from the internet. Documents from outside the organization. Web pages. Outputs from MCP servers whose tool descriptions contain injected instructions. Anything the agent reads that was authored by someone other than a trusted principal. This is also nearly universal: why would you build an agent that only reads content you already trust?

03EXTERNAL COMMUNICATION

The agent can send data out.

HTTP requests. Webhook calls. Sending an email. Writing to a shared document. Calling a tool that logs to an external service. Posting to Slack. Any mechanism the agent has to move data from your environment to the outside world. When combined with the first two legs, this is the exfiltration channel.

A concrete attack path with MCP

Trifecta check — what Keelix looks for
Leg 1 present: MCP server with read_file / query_db / email tools
Leg 2 present: agent configured to process external/untrusted content
Leg 3 present: outbound tool (send_email, http_request, webhook)
All three present → HIGH severity finding

Keelix detects it deterministically.

Break the trifecta: removing one leg is enough.

You don't need to eliminate all three capabilities. You need to make sure they don't coexist simultaneously for the same agent in the same deployment context.

OPTION A

Remove the exfiltration channel.

Audit which agents truly need outbound communication tools. An agent that reads email and answers questions about your codebase doesn’t need send_email or http_request. Strip Leg 3 and the trifecta collapses.

OPTION B

Disable auto-approval.

With auto-approval off, every tool call requires a human to confirm before it executes. A successful prompt injection still produces a request — it just can’t execute silently. This is the highest-leverage single control for most deployments.

OPTION C

Scope tool access to trusted content only.

If the agent only processes content from trusted principals — not external emails, not public web pages, not user-submitted documents — Leg 2 disappears. Tight input scoping is often the cleanest architectural fix.

Frequently asked

What is the lethal trifecta?
The lethal trifecta is a security framework introduced by Simon Willison in June 2025. It describes the combination of three capabilities in an AI agent that, when present together, make prompt injection attacks dangerous enough to cause real data exfiltration: (1) access to private data, (2) exposure to untrusted content, and (3) the ability to communicate externally.
Who introduced the term lethal trifecta?
Simon Willison, a software engineer and researcher known for co-creating Django and the Datasette open-source project. He introduced the framework on June 16, 2025 at simonwillison.net/2025/Jun/16/the-lethal-trifecta/ and it quickly became the standard framing for this class of AI agent vulnerability. Note: Willison explicitly credits himself with coining the term "prompt injection" but does not make the same claim for "lethal trifecta" — he presents it as an established framing.
What are the three components of the lethal trifecta?
Leg 1 — Private data access: the agent has tools to read sensitive information (email, files, database records, API responses). Leg 2 — Untrusted content exposure: content the agent processes can contain adversarial instructions (emails, web pages, documents, MCP tool outputs). Leg 3 — External communication: the agent can send data outbound (HTTP requests, webhook calls, sending emails, writing to remote storage). All three must be present simultaneously for the attack to succeed.
How do you defend against the lethal trifecta?
The most reliable mitigations are: (1) break the trifecta by removing one leg — if the agent cannot communicate externally, data cannot be exfiltrated even if legs 1 and 2 are present; (2) disable auto-approval so a human confirms tool calls before they execute; (3) use strict tool scoping — agents should have read access only where needed, not write + send permissions by default; (4) scan your live deployment with Keelix to get a deterministic check of whether all three legs are simultaneously present on your box before you ship.

Find out if your agents have all three legs.

Free, local-first, Apache-2.0. The scan runs on your box and nothing leaves it.

operator@host — keelix
# install — free & open source (Apache-2.0)
$ curl -fsSL https://keelix.dev/install.sh | sh
$ keelix scan