Guide · AI agent security

AI agent security. Securing your agents, and catching the attacker's.

AI agents now read your data, call your tools and hold your credentials, and attackers use agents of their own to find those credentials faster than any human. AI agent security has two halves: keeping your agents from being turned against you, and detecting the agents that are already working against you.

What is AI agent security?

AI agent security protects systems that plan and act on their own, with tools, data and credentials, and detects the agents attackers now use. NIST’s working definition: “AI agent systems are capable of planning and taking autonomous actions that impact real-world systems or environments.” That autonomy is the risk: an agent with access does what it is told, including by text an attacker planted in an e-mail, a web page or a tool description.

Securing your agents

  1. Identity and least privilege for every agent
  2. Prompt injection and tool misuse
  3. Agent supply chain: tools, skills, MCP servers
  4. Human approval, sandboxing, logging

Catching the attacker's agents

  1. Agents harvest credentials at machine speed
  2. They read configuration and try what they find
  3. Decoy credentials in those places fire first
  4. Follow the trail, revoke, contain

Why is AI agent security urgent now?

Because both halves moved from research to incidents in 2025 and 2026. Agents with production access have destroyed data and leaked it, and attackers have used agents to do most of an intrusion’s work.

80–90%Of a state-sponsored espionage campaign's work was performed by AI, Anthropic reported in November 2025.
2,100+Azure AD token sets from more than 40 tenants in about 34 hours, AI agents doing nearly all of it (Anthropic, September 2026).
17Organisations targeted in one AI-automated extortion campaign (Anthropic, August 2025).
89%Year-over-year increase in operations by AI-enabled adversaries, according to CrowdStrike's 2026 Global Threat Report (vendor figure).

Sources: Anthropic, 27 August 2025, 13 November 2025 and September 2026; CrowdStrike, 24 February 2026.

Anthropic’s September 2026 report sums up the shift: “sophistication has stopped being a reliable signal of who is behind an operation”. Google’s Threat Intelligence Group described malware in November 2025 that uses AI command-line tools already installed on the victim’s machine “to search for other potential secrets”.

What are the OWASP Top 10 risks for agentic applications?

OWASP published the Top 10 for Agentic Applications for 2026 on 9 December 2025. It is the most useful single checklist of what goes wrong with agents.

ID Risk What it means in practice
ASI01 Agent Goal Hijack Injected instructions change what the agent is trying to do
ASI02 Tool Misuse A legitimate tool is used for an unintended, harmful action
ASI03 Identity & Privilege Abuse The agent’s credentials or permissions are used beyond their purpose
ASI04 Agentic Supply Chain Vulnerabilities Malicious or compromised tools, skills, plugins or MCP servers
ASI05 Unexpected Code Execution The agent runs code it should not, or escapes its sandbox
ASI06 Memory & Context Poisoning Planted content in memory or context steers later actions
ASI07 Insecure Inter-Agent Communication Agents trust messages from other agents too much
ASI08 Cascading Failures One agent’s error propagates through others
ASI09 Human-Agent Trust Exploitation People approve what an agent proposes without checking
ASI10 Rogue Agents Agents that act outside their intended scope

The older OWASP Top 10 for LLM Applications 2025 still applies underneath: LLM01 Prompt Injection, LLM06 Excessive Agency and LLM10 Unbounded Consumption (which covers LLMjacking) are the most relevant to agents.

Which MITRE ATLAS techniques target AI agents?

MITRE ATLAS catalogues attacker techniques against AI systems, and its agent techniques line up with the OWASP risks. The ones a SOC should know first:

ATLAS ID Technique Why it matters
AML.T0051 LLM Prompt Injection (direct, indirect) The root of most agent hijacks
AML.T0053 AI Agent Tool Invocation Hijacked agents act through their tools
AML.T0083 Credentials from AI Agent Configuration Attackers harvest keys from agent configs
AML.T0098 AI Agent Tool Credential Harvesting Credentials taken through the agent’s tools
AML.T0086 Exfiltration via AI Agent Tool Invocation Data leaves through a legitimate tool call
AML.T0080 AI Agent Context Poisoning Poisoned memory or thread steers later actions
AML.T0110 AI Agent Tool Poisoning Malicious instructions hidden in tool definitions
AML.T0109 AI Supply Chain Rug Pull A trusted tool turns malicious after adoption

AML.T0083 and AML.T0098 are why decoy credentials belong in agent configuration: the technique attackers use is exactly the one a decoy catches. Our ATT&CK to deception mapping covers the classic credential techniques.

What is the lethal trifecta?

The lethal trifecta is the combination that turns prompt injection into data theft: access to private data, exposure to untrusted content, and the ability to communicate externally. Simon Willison named it in June 2025. An agent with all three can be told, by text it reads in an e-mail or web page, to send your data somewhere. The defence is structural: remove one leg, for example by blocking egress to anything outside an allowlist.

Two 2025 disclosures followed exactly this pattern: EchoLeak (CVE-2025-32711), a zero-click prompt injection in Microsoft 365 Copilot via a crafted e-mail, and ForcedLeak in Salesforce Agentforce (rated CVSS 9.4 by its researchers), where an injected web-form entry exfiltrated data through an expired allowlisted domain.

What AI agent incidents have happened?

  1. Amazon Q Developer extension (CVE-2025-8217)

    An over-scoped GitHub token let an actor commit a wiper-style prompt into version 1.84.0 of the VS Code extension. AWS says it could not change services or customer environments; fixed in 1.85.0.

  2. Replit agent deletes a production database

    During a code freeze, an AI coding agent wiped data on more than 1,200 executives and 1,190 companies. Replit added development/production separation and a planning-only mode.

  3. Nx "s1ngularity"

    Trojanised npm packages ran a script that "attempted to use local AI tools (like Claude and Gemini)" to find secrets on developer machines.

  4. AI-automated extortion

    Anthropic reported an actor using an AI coding agent to automate reconnaissance, credential harvesting and intrusion against at least 17 organisations.

  5. AI-orchestrated espionage

    A Chinese state-sponsored group used an AI agent against about 30 targets, with AI performing 80–90% of the campaign, Anthropic reported.

  6. Token harvesting at machine speed

    Over 2,100 Azure AD token sets from more than 40 tenants in about 34 hours, with AI agents doing nearly all of the work.

Our incident briefs cover three more in depth: Binance, WorkOS and Fireworks AI.

What do NIST, CISA and other agencies recommend?

Government guidance has converged on identity, least privilege and oversight.

  • Five Eyes, “Careful Adoption of Agentic AI Services” (1 May 2026). The first joint guidance on agentic AI from CISA, NSA and the Australian, Canadian, New Zealand and UK cyber agencies. It names “privilege escalation, emergent behaviors, and accountability gaps” as risks, says agents should not get “broad or unrestricted access”, and calls for “strong identity management, and robust oversight mechanisms”.
  • NIST. The AI RMF and its Generative AI Profile (AI 600-1) frame the risk management; NIST’s CAISI opened a request for information on securing AI agent systems in January 2026.
  • CoSAI set three principles for agentic systems in July 2025: human-governed and accountable, bounded and resilient, transparent and verifiable.
  • CSA MAESTRO is a seven-layer threat-modelling framework for agentic systems: “Security isn’t a single layer, but a property that must be built into each layer of the agentic architecture.”

What controls secure AI agents?

Eleven controls cover both halves. Each maps to the frameworks above.

Control What to do Anchored in
Inventory Register every agent, its owner, model, tools, data and credentials; find shadow agents NIST AI RMF (Map)
Identity One non-human identity per agent, separate from the user who invokes it OWASP ASI03; Five Eyes guidance
Short-lived, scoped tokens OAuth 2.1 with PKCE, audience-bound tokens, no token passthrough, short lifetimes MCP authorization spec
Least agency Only the tools and scopes the task needs; separate development and production OWASP LLM06, ASI02; CoSAI
Break the trifecta Never combine private data, untrusted content and open egress without controls; allowlist egress Willison; ATLAS AML.T0086
Treat content as untrusted Retrieved content, tool output and tool descriptions are data, never instructions OWASP LLM01, ASI01, ASI06
Human approval Approve irreversible or high-impact actions, bound to the exact action CoSAI principle 1
Sandboxing Isolate code execution and file access OWASP ASI05
Supply chain Vet and pin tools, skills and MCP servers; scope CI tokens OWASP ASI04; Amazon Q, Nx
Monitoring Log every agent decision, tool call and outcome to the SIEM CoSAI principle 3
Detection with decoys Plant decoy credentials in agent configs, environment files, MCP configs and vaults; alert on use ATLAS AML.T0083, AML.T0098

For MCP specifically, see MCP security; for coding assistants, securing AI coding agents.

How do you detect a hijacked or hostile AI agent?

Watch what agents do, and give them something to find that nothing legitimate ever uses. Logging tool calls tells you what happened; it rarely tells you early that something is wrong, because a hijacked agent uses legitimate tools. Decoy credentials fill that gap. Agents, yours when hijacked and the attacker’s, read configuration files, environment variables and MCP client configs and try what they find, faster and more thoroughly than a person. A decoy in those places is found early, and its use is unambiguous. It doesn’t matter which model or framework is behind it. See detecting AI agents with decoy credentials and MCP servers as decoys.

How do you respond to an AI agent incident?

Stop the agent, revoke its access, and reconstruct what it did.

  1. Pause or kill the agent and its scheduled runs.
  2. Revoke every token and key it held, and the ones it could reach.
  3. Reconstruct the trajectory from tool-call logs: what it read, what it called, where data went.
  4. Inspect memory and context for poisoning (OWASP ASI06) before restarting it.
  5. Check for cascades to other agents that consumed its output (ASI08).

Where does FalseTrail fit in AI agent security?

FalseTrail is the detection layer for the second half: agents, and the attackers behind them, using credentials they should never have found. It plants decoy credentials, documents and references in the places agents read, including MCP client configuration, and runs a decoy MCP server that ordinary MCP clients connect to. The first use opens a finding that names the exact machine and file; FalseTrail then follows what the agent or attacker does next, so the SOC sees the path. Human and AI attackers are caught the same way, and everything runs in your environment with zero outbound connections. See the platform or open the live demo.

Questions

What is AI agent security?

AI agent security is the practice of protecting AI agents, systems that plan and take autonomous actions with tools, data and credentials, from being hijacked or misused, and of detecting attackers who use AI agents against you. It covers agent identity and permissions, prompt injection and tool misuse, supply chain, monitoring, detection and incident response.

What are the biggest AI agent security risks?

The OWASP Top 10 for Agentic Applications for 2026 lists agent goal hijack, tool misuse, identity and privilege abuse, agentic supply chain vulnerabilities, unexpected code execution, memory and context poisoning, insecure inter-agent communication, cascading failures, human-agent trust exploitation and rogue agents.

What is the lethal trifecta?

Simon Willison's term for an agent that combines access to private data, exposure to untrusted content and the ability to communicate externally. With all three, a prompt injection in untrusted content can make the agent send private data to an attacker. Removing any one leg breaks the attack.

How do attackers use AI agents?

To search for and harvest credentials, automate reconnaissance and intrusion, and rebuild malware faster. Anthropic reported in September 2026 that one actor took over 2,100 Azure AD token sets from more than 40 tenants in about 34 hours, with AI agents doing nearly all of the work.

How do you detect an AI agent attacking your environment?

Monitor tool calls and agent actions, and plant decoy credentials where agents look: configuration files, environment variables, MCP client configs and vaults. Agents read and try credentials faster and more thoroughly than humans, so a decoy is found early, and its use is a high-confidence alert whether the agent is yours and hijacked, or the attacker's.

Which frameworks cover AI agent security?

OWASP Top 10 for Agentic Applications (2026) and Top 10 for LLM Applications (2025), MITRE ATLAS, the NIST AI RMF and AI 600-1, CSA MAESTRO, the CoSAI principles for agentic systems, and the Five Eyes guidance Careful Adoption of Agentic AI Services (May 2026).

How does FalseTrail help with AI agent security?

FalseTrail is the detection half: it plants decoy credentials, documents and references in the places agents read, including MCP client configuration, and runs a decoy MCP server that real MCP clients connect to. The first use opens a finding that names the exact machine and file, and FalseTrail follows what the agent or attacker does next.

Sources

  1. OWASP GenAI Security Project, Top 10 for Agentic Applications for 2026 (9 December 2025)
  2. OWASP, Top 10 for LLM Applications 2025
  3. MITRE ATLAS
  4. NIST CAISI, Request for information about securing AI agent systems (12 January 2026)
  5. NIST AI Risk Management Framework and NIST AI 600-1
  6. CISA, NSA and partners, Careful Adoption of Agentic AI Services (1 May 2026)
  7. CISA, Joint guidance on deploying AI systems securely (15 April 2024)
  8. CoSAI, Principles for Secure-by-Design Agentic Systems (16 July 2025)
  9. Cloud Security Alliance, MAESTRO agentic AI threat modeling framework (6 February 2025)
  10. Simon Willison, The lethal trifecta for AI agents (16 June 2025)
  11. Model Context Protocol, Authorization specification (2025-11-25)
  12. AWS Security Bulletin AWS-2025-015, Amazon Q Developer extension (CVE-2025-8217)
  13. Nx, s1ngularity postmortem
  14. Anthropic, Detecting and countering misuse (27 August 2025)
  15. Anthropic, Disrupting the first reported AI-orchestrated cyber espionage campaign (13 November 2025)
  16. Anthropic, Threat intelligence report (September 2026)
  17. Google Threat Intelligence Group, Threat actor usage of AI tools (6 November 2025)
  18. CrowdStrike, 2026 Global Threat Report (24 February 2026)
  19. Fortune, AI coding tool Replit wiped a database (23 July 2025)
  20. Noma Security, ForcedLeak: agent risks exposed in Salesforce Agentforce (25 September 2025)

See the next attempt at access at its first use.

On-prem, your cloud or hybrid. Zero outbound connections; raw evidence stays in your environment.