Permissions & safetyAntipatternProven

Lethal trifecta

Also called: the trifecta

The lethal trifecta is an agent having access to private data, exposure to untrusted content, and a way to communicate outward, all at once. Any two are usually survivable; all three make data theft a matter of someone asking.

James Phoenix
Understanding Data Updated July 26, 2026

Most agent security incidents are not exotic. They are the same three ingredients in one process:

  1. Access to private data. Your repository, your database, your credentials, your customers.
  2. Exposure to untrusted content. A web page, a retrieved document, a dependency's README, an issue comment. Anything an attacker can write.
  3. A way to communicate outward. An HTTP request, an email, a commit, a webhook. Anywhere data can go.

With all three, an attacker who can influence what the agent reads can, in principle, get it to send your private data somewhere. They do not need an exploit. They only need the agent to be helpful.

Why it is worth naming

The value of the name is that it turns "is this agent safe?" into three checkable questions. Safety stops being a vibe and becomes an audit you can actually perform on a tool configuration.

It also explains why patching the prompt does not help. The trifecta is a property of the agent's capabilities, not of its instructions. Adding "do not exfiltrate secrets" to the system prompt leaves all three legs standing.

Breaking a leg

Removing any one leg collapses the worst case, and the cheapest one to remove is usually the third:

  • Cut egress. An agent that reads untrusted pages and holds secrets but cannot make arbitrary outbound requests can be misled into a bad answer, not into theft. See egress control.
  • Cut private access. Scope credentials to the task. An agent summarising public documentation does not need production database access. See least privilege.
  • Cut untrusted content. Hardest in practice, because retrieval and browsing are usually the point. Treat this as the leg you cannot rely on removing.

Where it hides

The trifecta is rarely configured deliberately. It accretes. A tool is added for one task and stays. An MCP server exposes more than the current job needs. A credential in the environment is inherited by every session. Audit the union of what an agent can reach, not each addition in isolation, because the third leg is usually the one nobody remembers adding.

Watch out
Untrusted content includes your own repository. A stale code comment or a dependency's README is attacker-controlled for this purpose, and a comment written years ago with no malice can do the same damage as a deliberate prompt injection.

Related terms

Building with AI agents?

This dictionary is part of how I think about agentic engineering. If you want the same thinking applied to your codebase, that is what I do.

See how I can help