Prompt Injection and Agent Security: A Plain-English Guide
AI assistants follow instructions written in plain language. The trouble is that they can’t reliably tell your instructions from instructions an attacker has hidden in something the AI reads. That weakness is called prompt injection, and it is the main security problem for AI agents today.
A simple example
Developer Simon Willison, who coined the term, gives this scenario: you ask an assistant to summarise a web page, and the page secretly says to find your private data and send it to a stranger. There is a good chance the AI simply does it. Researchers have shown the same trick with text hidden in a YouTube transcript, which Tom’s Hardware tested with ChatGPT.
Why it is hard to fix
You may have heard it compared to SQL injection, a classic web attack that was eventually tamed. The UK’s National Cyber Security Centre says the comparison is dangerous. Databases can keep commands and data separate, but today’s language models have no such wall: everything is just text. The NCSC suggests thinking of an AI as an “inherently confusable deputy” and says the goal is to reduce the risk and the damage, not to expect a perfect cure.
The lethal trifecta
Willison’s memorable rule: danger spikes when one agent has all three of these at once.
1. Access to your private data (email, files, code)
2. Exposure to untrusted content (web pages, inbound email, documents)
3. A way to communicate outward (send email, call web addresses)
All three together = an attacker can steal data with a planted message.
Remove any one leg and the risk drops sharply.
Willison also argues that security products which catch most attacks aren’t good enough, since an attacker only needs one to get through. Meta has proposed a related “Rule of Two”: an agent should combine at most two of untrusted input, access to sensitive systems, and the power to change things outside itself.
What you can do
As a user: connect only the tools you need, grant read-only access where possible, and be careful letting an assistant act on email or web pages from strangers. Check what an agent plans to do before approving important actions.
As a builder or manager: give agents the least access that works, require human approval for risky steps, keep logs, and design so that a tricked agent can’t cause much harm.
Where this fits
Prompt injection is one reason the agent habits in our agents post stress limits and approvals.
Further reading
- Prompt injection is not SQL injection (it may be worse) (UK National Cyber Security Centre, national government): the official assessment
- Prompt injection attacks might never be properly mitigated (TechRadar): news coverage of the NCSC post
- NCSC issues warning over AI prompt injection risks (ITPro): what security teams should take from it
- The lethal trifecta for AI agents (Simon Willison’s blog): the original explanation
- How to stop AI’s “lethal trifecta” (Hacker News): discussion of an Economist article on the topic
- Agentic AI and Security (Martin Fowler’s site): a practical guide for builders
- Agents Rule of Two (Meta AI): a framework for limiting agent risk
- ChatGPT vulnerable to prompt injection via YouTube transcripts (Tom’s Hardware): a hands-on test