# Agent security

> An agent reads content it does not control and has tools: a booby-trapped document can make it follow hidden instructions. Defense combines fewer permissions, bounded actions, filters and traces. No filter is enough on its own.

OWASP’s Top 10 for Agentic Applications, published in December 2025, lists the agent-specific threats as: goal hijack, tool misuse, identity and privilege abuse, supply chain, unexpected code execution, memory and context poisoning, insecure inter-agent communication, cascading failures, human-agent trust exploitation, rogue agents.

Three capabilities form a dangerous combination: access to private data, exposure to untrusted content and the ability to send data out. Together in one agent, they make exfiltration possible. Removing any one of the three breaks the path.

Defenses stack up: least privilege, approval for outbound sends, an allowlist of domains, isolating the agent. ANSSI recommends limiting automatic actions when input is not controlled, partitioning the system, logging operations and reviewing permissions.

Test with injection scenarios in the evaluation set, and a red-teaming campaign for every agent that acts.

When an incident happens, stop the agent, revoke its access, replay the trace to understand what happened and notify the people affected. Write and rehearse this procedure before the first incident.

**When**: Needed as soon as an agent reads outside content (emails, web pages, attachments) or has a tool that writes or sends. Less pressing for an assistant without tools that only reads the signed-in person’s documents: the risk is lower.

**Trade-offs**: Each guardrail adds friction or an approval. Removing the ability to send data out protects best, and also removes part of the usefulness.

## Where to start

- Find agents that combine private data, outside content and outbound sending
- Remove one of the three or require approval
- Add injection cases to the evaluation set
- Write the procedure for stopping an agent

## Common mistakes

- Relying on an input filter to stop all injections
- Letting an agent read incoming email and send email unchecked
- Installing extensions and servers without review

## Metrics

- Agents combining all three capabilities
- Injections caught in testing and in production
- Time to stop an agent

## Sources

- [OWASP, Top 10 for Agentic Applications 2026](https://genai.owasp.org/2025/12/09/owasp-top-10-for-agentic-applications-the-benchmark-for-agentic-security-in-the-age-of-autonomous-ai/)
- [ANSSI, Security recommendations for a generative AI system](https://cyber.gouv.fr/en/publications/security-recommendations-generative-ai-system)
- [Simon Willison, The lethal trifecta for AI agents](https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/)
- [MCP, Security best practices](https://modelcontextprotocol.io/specification/2025-11-25/basic/security_best_practices)
