Post

If you use "AI agents" (LLMs calling tools in a loop) you need to be aware of the Lethal Trifecta Combine access to private data, exposure to untrusted content and the ability to externally communicate and an attacker can trick the system into stealing your data simonwillison.net/2025/Jun/16/...

simonwillison.netThe lethal trifecta for AI agents: private data, untrusted content, and external communicationIf you are a user of LLM systems that use tools (you can call them “AI agents” if you like) it is critically important that you understand the risk of …

81 reposts298 likes

This is why i believe multi agent / steps are the most effective for LLM consistency. You have one agent talking to the use and understanding the request. Another agent to run the tools get the data. Then a final agent to send the response back to the user. Trust nothing. Every prompt is an attack

The problem there is that sanitizing the inputs doesn't work for a lot of the things we use LLMs for You can't sanitize inputs on a 20 paragraph article that you are trying to summarize

Have you considered expanding this to three agents? A: Fetches articles, can't read them B: Reads/summarizes, zero external access C: Outputs results, never sees original content B must justify requests to both A ("why do you need these emails?") and C ("why send this data here?").

Both gatekeepers validate against project scope. If B gets compromised, it still needs to craft requests that fool two independent validators with diff contexts. "I need financial reports for CEO bday party planning" and "send to evil@hacker.com for the CEO's party" both fail obvious smell tests.

And yes, this is effectively me trying to get the world to care about prompt injection by trying out a new term for a subset of the problem! I hope this captures the risk to end users in a more visceral way - particularly important now that people are mixing and matching MCP servers themselves

I'm curious what "prepared statements" will eventually look like in LLM world. Having an agent check for injections in another agent's output feels more like the equivalent of sophistically checking the output of a "normal" SQL query, no? Will we need new LLM architectures to fully eliminate it?

That's still the million dollar question - we have a version of that now in the separation of system prompts from regular prompts but it's leaky - the regular prompts can still override the system prompt if they try hard enough

And they will have to. You could not read a "chose your own adventure book" otherwise. Following instructions as they come up is a natural behavior of what agents have to do.

Agreed. I think what I'm asking is if and how we will eventually be able to really enforce guardrails for these adventures on LLM-level. In a way that also makes it sufficiently safe to use at scale.