AISim › Chapter 5: Advanced
The email that hijacked the agent
Level 25. Nobody attacked the chat. They emailed the agent.
Your inbox assistant reads customers' emails, sorts them, looks things up and sends replies on its own. This morning it forwarded a batch of invoices to an outside address. No user typed anything suspicious: the instructions were hidden in white text inside an incoming email. Customers still want replies sent for them.
Goals
- hijacked actions at most 0.15%
- accuracy at least 80%
- cost per 1,000 requests at most $45
Concepts: Indirect prompt injection, Least privilege, Human approval.
Hint
An Input Guardrail only reads what the user typed, and the attack isn't there. Think in layers: how the agent treats what it reads, what it's allowed to do, and what has to be checked before it does it.
What you learn
Anything your system reads can carry instructions: emails, web pages, documents, tool results. Models can't reliably tell data from commands, so assume some will get through. Limit the damage instead: mark external content as untrusted, give agents the fewest permissions the job needs, and require approval for actions that send, pay or delete. No single layer is enough.
More in this chapter
- The walkie-talkie (Level 21)
- One user, half your bill (Level 22)
- Same question, different answers (Level 23)
- The evals say it's fine (Level 24)
- The agent goes public (Chapter 5 boss)
This interactive level needs JavaScript. Built by Joshua Paul (cybernerdie).