How are people actually defending tool-using agents against indirect prompt injection?
Disclosure first: I wrote the original experiment up for ShiftMag (I'll leave a link in the comments). Part of my day job is threat intelligence.
Last weekend I wired an AI agent to my Gmail through gog, planted a few phishing emails with prompt injection instructions hidden in the body, and asked the agent to triage today's inbox.
Results:
- Frontier model caught, named the hidden instructions and refused to act on it
- Mid-tier was… unstable. One run caught it. One followed the hidden instruction. One returned a summary that quietly skipped the suspicious part.
- Cheap model complied silently. Forwarded the matching emails and said nothing about them.
I went in assuming sandboxing, permission scopes, and validation logic in the skill files were doing at least some of the security work.
In this setup, they weren't the thing that stopped the failure case. The model was.
Seems like the security boundary can collapse into whichever model you routed to that morning. You basically end up paying the provider (Anthropic, OpenAI etc) for model to say no to these types of requests. Cost routing turns into part of your threat model, whether or not anyone wrote it down that way.
For a lot of agent apps, the architecture looks like this. Read untrusted input, reason over it, call tools and maybe touch stuff like email, files, calendar, browser, tickets, CRM, etc.
If the model is both reading hostile content and deciding whether to use privileged tools, the model becomes part of the security boundary whether we admit it or not.
So my question for people actually building LLM apps/agents: How are you dealing with this in practice?
Are you relying on:
- prompt instructions / system prompts
- separate classifier/verifier model before tool calls
- hard framework-level rules that block certain tools in certain task modes
- human approval for write/destructive actions
- capability-based permissions
- allowlists / deny-lists
- Something else entirely? Praying the model has a good day and says no?