Topic 1 of 5 · 4 min read
Private data, untrusted content and an outbound channel
Goal: Mark which tools in an agent's configuration supply private data, untrusted content or an outbound channel.
An agent can be tricked into stealing your data when one session holds three things at once: access to private data, exposure to untrusted content, and a way to send data out. Simon Willison called this combination the lethal trifecta. Remove any one leg and the attack stops working.
Check yourself · 1 of 3
Which three things together make up the lethal trifecta?
Why it matters
A language model cannot reliably tell your instructions from instructions hidden in the text it reads. It reads everything as one stream. So if an attacker can put text in front of the model, the model may obey it. That is prompt injection. On its own it is a nuisance. Combined with private data and a way out, it becomes theft.
The three legs
- Private data. Anything the attacker could not read themselves: email, source code, chat history, API keys in the environment, customer records, files on disk.
- Untrusted content. Any text the model reads that someone other than you wrote: web pages, inbound email, issue comments, PDFs, shared documents, tool descriptions from a third-party server.
- An outbound channel. Any action that moves data to a place the attacker can see: sending email, posting a comment, fetching a URL the model chooses, calling a webhook, pushing to a public repository.
How to audit an agent
List every tool and data source in the session. For each one, ask three questions. Does it read data that is private? Does it read text an outsider can influence? Can it write or send anything outside the trust boundary? Mark each tool with one or more legs. If all three marks appear in the same session, the design is exposed, however good the system prompt is.
One tool can supply two legs. A mail tool reads private inbox content and also reads untrusted inbound mail. A browser tool reads untrusted pages and can fetch attacker-chosen URLs.
Before and after
Before: "Our assistant reads the inbox, the shared drive and any link a customer sends, and it can email replies. It is safe because the prompt says to ignore instructions in emails."
After: "The mail tool reads private data and untrusted content. Sending email is an outbound channel. All three legs meet. We remove automatic sending: the assistant drafts, and a person sends."
What goes wrong
- Teams rely on a prompt that says "never follow instructions in documents". Models do not follow such rules every time, and an attacker only needs one success.
- Teams count only tools they added, and miss the outbound channels built into the product, such as link rendering.
- Teams check each tool alone. The risk lives in the combination inside one session.
Examples
Auditing a mail assistant
Tools: read_inbox, read_calendar, send_email, open_link.
- read_inbox: private data and untrusted content (outsiders write the mail).
- read_calendar: private data.
- send_email: outbound channel.
- open_link: untrusted content, and an outbound channel if the model picks the URL.
All three legs meet, so a single crafted email can ask the model to mail your inbox elsewhere.
A safe configuration
A read-only code explainer has repository access (private data) and reads issue text (untrusted content) but has no network, no write tools and no link rendering. Two legs, no way out, so there is no theft path.
Key points
- The lethal trifecta is private data, untrusted content and an outbound channel in the same session.
- Removing any one leg stops the data theft, because the attack needs all three.
- A model cannot reliably separate your instructions from instructions hidden in content it reads.
- One tool can supply two legs, such as a mail tool that reads private and untrusted text.
- A system prompt that says to ignore injected instructions is not a control.
Common mistakes
- Trusting a prompt instruction to block injected text instead of removing a leg.
- Judging each tool alone instead of the whole session.
- Treating only email and webhooks as outbound channels.
- Assuming only public web pages are untrusted, when inbound mail and shared documents are too.
Check yourself · 2 of 3
An agent can read your private notes and send email, but it never reads any text written by an outsider. Which leg is missing?
Check yourself · 3 of 3
A support agent reads customer tickets, looks up order history and can post replies on a public forum. What is the best description of its risk?
Practice items, not counted towards your mastery.
Start here
- The lethal trifecta for AI agents (Simon Willison) (opens in a new tab)ArticleFree
The post that named the trifecta, with real incidents and the plain rule that follows.
- Meta: Agents Rule of Two, a practical approach to AI agent security (opens in a new tab)ArticleFree
Meta's rule of allowing at most two of three risky properties per session without a human check.
- LLM01: Prompt Injection (OWASP) (opens in a new tab)StandardFree
The standard description of prompt injection, with attack types and mitigations.