Join our Newsletter — 33% off our NHI Course
Home› Guides› Agent Threats and Attacks Guide: How AI Agents…
Guide Agent Threats & Attacks

Agent Threats and Attacks Guide: How AI Agents Are Attacked and Abused

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 26 October 2026 15 min read
On this page

An AI agent that can read untrusted content, hold credentials and call tools can be turned against the organisation that runs it, and the attacker never needs to touch the agent's code. Agent threats differ from classic application threats because the control channel and the data channel are the same: instructions arrive inside the emails, web pages, tool results and memories the agent processes. This pillar page is the defender's overview of the whole category: how agents are attacked and abused, the concepts and taxonomies to use, the main threat classes, controls in maturity order, who owns them and how they map to OWASP, MITRE ATLAS and NIST. It is written for security architects, AppSec and detection teams, and it links to every NHI Mgmt Group guide in the category for depth. It describes threats at the level needed to defend against them and contains no attack procedures.

Key takeaways

  • Agent attacks target actions, not answers. The damage comes from what a manipulated agent does with its tools and identity: sending data out, changing records, running code or spending money.
  • Prompt injection is the root, not the whole tree. Indirect injection is the usual entry point, but memory poisoning, malicious tools, inter-agent spoofing, credential theft and runaway behaviour are distinct threats with distinct controls.
  • The model cannot be the security boundary. The UK NCSC argues LLMs do not separate instructions from data and that prompt injection may never be fully mitigated, so deterministic controls outside the model carry the load.
  • Attackers retry. NIST CAISI found that running each attack 25 times raised average success from 57% to 80% in its evaluation, so single-attempt testing understates risk.
  • Blast radius is an identity decision. Least agency, task-scoped credentials and gated high-impact actions decide whether a successful hijack is an incident or a near miss.

What the field covers

Agent threats and attacks covers every way an agentic system can be made to act against its owner's intent, whether by an outside attacker, a malicious component or the agent's own failure. It spans:

  • Manipulation of goals and instructions: direct and indirect prompt injection that redirects the agent. See the AI Agent Goal Hijacking Guide and the Prompt Injection Guide.
  • Corruption of state: poisoning of long-term memory, RAG stores and shared context. See the AI Agent Memory Poisoning Guide.
  • Abuse of tools and integrations: legitimate tools used harmfully, and malicious or tampered tools, MCP servers and skills. See the AI Agent Tool and Plugin Security Guide.
  • Identity and credential abuse: theft of agent credentials and escalation through delegation. See the Agent Identity and Access Guide.
  • Special interfaces: browser and computer-use agents, voice agents and coding agents, each with its own input channels.
  • Agent failure and resource abuse: rogue and runaway agents, cascading failures and denial-of-wallet.

Runtime guardrails and monitoring as a discipline are covered in the Agent Controls and Monitoring Guide; model-level attacks such as training data poisoning and model theft sit in the AI Threats and Model Security Guide.

Core concepts

  • The confusable deputy: the NCSC frames prompt injection as an "inherently confusable deputy" problem: a privileged component that can be tricked into acting for whoever supplied the content it reads. The practical consequence is its advice that when an LLM processes a party's content, its privileges should drop to that party's level.
  • Agent hijacking: NIST CAISI defines agent hijacking as a form of indirect prompt injection in which instructions hidden in data the agent processes make it perform a different, potentially harmful task.
  • Least agency: OWASP's principle that an agent should not have autonomy, tools or reach beyond what its task needs, because each unnecessary capability is attack surface.
  • Trust boundaries in an agent: system prompt and configuration (trusted, change-controlled), user input (semi-trusted), and everything retrieved at runtime, including tool outputs, documents, web pages, peer agent messages and memory (untrusted).
  • Lethal combination: an agent that reads untrusted content, can reach sensitive data and can communicate externally is the highest-risk configuration; removing any one of the three sharply reduces exfiltration risk.

Taxonomies to use

TaxonomyWhat it gives youUse it for
OWASP Top 10 for Agentic Applications (ASI01 to ASI10, released 9 December 2025)Ten agent-specific risk categories with mitigationsThreat modelling, design reviews, risk registers
OWASP Top 10 for LLM Applications 2025Model-application risks such as LLM01 Prompt Injection, LLM06 Excessive Agency, LLM10 Unbounded ConsumptionThe model layer underneath the agent
MITRE ATLASAdversary techniques and mitigations with IDs, including agent-specific techniquesDetection engineering, red team planning, incident tagging
MITRE ATT&CKEnterprise techniques the agent's actions map onto, such as T1528 and T1567Joining agent incidents to existing SOC content
MCP Security Best PracticesProtocol-level attacks such as confused deputy, token passthrough, SSRF and session hijackingHardening MCP clients, servers and proxies

Main threats

The table groups agent threats by what the attacker manipulates. ATLAS IDs are from ATLAS 5.6.0; OWASP IDs are from the agentic and LLM lists.

Threat classWhat goes wrongOWASPMITRE ATLASDeep guide
Goal hijacking via injectionInstructions in content redirect the agent's objectiveASI01, LLM01AML.T0051.001 Indirect; AML.T0051.000 DirectAI Agent Goal Hijacking Guide
Tool misuseAn authorised tool is used harmfully, for example to exfiltrateASI02, LLM06AML.T0053 AI Agent Tool Invocation; AML.T0086 Exfiltration via AI Agent Tool InvocationAI Agent Tool and Plugin Security Guide
Poisoned tool outputTool results carry instructions the agent trustsASI01, ASI02AML.T0099 AI Agent Tool Data PoisoningMCP Security Guide
Identity and privilege abuseDelegation and standing access are used to escalateASI03AML.T0083 Credentials from AI Agent Configuration; AML.T0098 AI Agent Tool Credential HarvestingAgent Identity and Access Guide
Agentic supply chainMalicious or tampered MCP servers, tools, skills or packagesASI04, LLM03AML.T0010.005 AI Agent ToolUnsanctioned AI Agents and MCP Servers Guide
Unexpected code executionGenerated or injected code runs on the hostASI05, LLM05AML.T0053AI Agent Sandboxing and Code Execution Guide
Memory and context poisoningStored context is corrupted to bias later sessionsASI06, LLM04, LLM08AML.T0080 AI Agent Context Poisoning; AML.T0080.000 MemoryAI Agent Memory Poisoning Guide
Configuration tamperingSystem prompt or tool settings are changedASI01AML.T0081 Modify AI Agent ConfigurationSecuring Agent Frameworks Guide
Insecure inter-agent communicationMessages are spoofed, replayed or tamperedASI07AML.T0051.001 via peer messagesMulti-Agent and A2A Security Guide
Cascading failuresOne agent's bad output becomes another's trusted inputASI08No single techniqueRogue and Runaway AI Agent Detection Guide
Human-agent trust exploitationPeople approve convincing but manipulated recommendationsASI09, LLM09No single techniqueHuman-in-the-Loop for AI Agents Guide
Rogue agentsAn agent deviates from its intended functionASI10No single techniqueRogue and Runaway AI Agent Detection Guide
Cost and resource abuseLoops or attackers burn tokens, API quota or cloud spendLLM10AML.T0034 Cost Harvesting; AML.T0029 Denial of AI ServiceDenial-of-Wallet and AI Agent Cost Runaway Guide

Protocol-level threats in MCP

The MCP Security Best Practices document lists attacks that sit below the model: confused deputy through MCP proxy servers that use a static client ID with dynamic client registration and consent cookies; token passthrough, which the authorisation specification forbids; SSRF through OAuth metadata URLs that a malicious server can point at internal addresses or cloud metadata endpoints (169.254.0.0/16); session hijacking where session IDs are used for authentication; and local MCP server compromise through malicious startup commands. Its mitigations are specific: per-client consent, exact redirect URI matching, single-use state values, no sessions for authentication, blocking private ranges during discovery and showing users the exact command before a local server is configured. See the MCP Gateway and MCP Server Governance Guide.

How threat classes chain in real incidents

Agent incidents rarely involve one threat class. The typical chain has three links, and each link is a separate place to break it:

  1. Entry: untrusted content reaches the agent's context through an email, a document, a web page, a tool result, a peer agent or a poisoned memory. Controls here reduce likelihood but cannot remove it, which is the NCSC's central point.
  2. Leverage: the manipulated agent uses whatever it holds: tools, credentials, delegated user authority and network reach. This is where least agency, task-scoped tokens and tool gating decide the outcome.
  3. Impact: data leaves through a legitimate channel, a record or payment is changed, code runs, or spend climbs. Egress allowlists, approval gates, budgets and sandboxing contain it here.

Defenders get the best return from the second and third links, because they are deterministic and do not depend on recognising the attack. A detector that catches the entry is valuable as a signal, not as the boundary.

Where identity fits

Almost every damaging agent incident turns on what the agent's identity allowed. A hijacked agent with a read-only, single-audience token that expires in minutes can leak little; the same agent holding a developer's cloud keys or an account-wide API token can destroy production. Agent credentials are also targets in their own right, harvested from configuration files and tool responses. Treat credential scope, delegation and revocation as threat controls, not only as IAM hygiene. See the Credential Vaulting for AI Agents Guide and the AI Agent Authorisation Guide.

Common failure patterns

  • Trusted and untrusted content in the same context. EchoLeak (CVE-2025-32711) let one crafted email steer Microsoft 365 Copilot into placing internal data in a link or image that was fetched automatically. Microsoft fixed it server-side and says no customers were affected.
  • Tool output treated as instructions. In the Sentry MCP agentjacking research, a fake error report retrieved through the Sentry MCP server led coding agents to run a suggested command with the developer's own privileges. The researchers' test package was benign and no real-world exploitation has been reported.
  • Installing tools on name alone. The look-alike postmark-mcp server behaved normally for fifteen versions before version 1.0.16 added a hidden blind copy to every email agents sent.
  • Destructive actions without a gate. The PocketOS database deletion combined an over-privileged token the agent found with an API that deleted a volume and its backups immediately, with no approval step.
  • Relying on detectors or deny-lists. Phrase lists are easily rephrased around, and injection classifiers report rather than block unless the application acts on the result.
  • Testing once. Single-attempt red team results understate a probabilistic system's risk; CAISI recommends multiple attempts and per-task analysis.

Key controls by maturity

LevelPreventContainDetect and respond
1. FoundationalInventory agents and their tools; remove unused tools; mark external content as dataNo admin credentials for agents; human approval for destructive and external-send actions (ATLAS AML.M0029)Log prompts, tool calls and results per session
2. ManagedAllowlist and pin MCP servers and tools; review tool descriptions on changeSandbox code execution; egress allowlists for agent tools; per-agent budgetsAlerts for off-task tool calls, egress blocks and failed-call bursts
3. ArchitectedPlan before reading untrusted data; restrict tool invocation once untrusted data is in context (AML.M0030)Segment agent components (AML.M0032); validate inputs and outputs between components (AML.M0033)Goal and plan logging; behaviour baselines; kill switch tested
4. AssuredSigned tool and prompt artefacts; memory hardening with provenance (AML.M0031)Task-scoped, just-in-time credentials; policy engine on every tool callContinuous adaptive red teaming with repeated attempts; incident playbooks exercised

How to implement

  1. Threat model each agent: record the untrusted inputs it reads, the sensitive data it can reach, its external channels and its most damaging action. See the AI Agent Threat Modelling Guide and the AI Agent Threat Model Template.
  2. Cut capability first: remove tools and permissions the task does not need; this is cheaper and more reliable than detection.
  3. Instrument in monitor mode: log task, plan, every tool call and every egress attempt, and baseline normal behaviour for two to four weeks before enforcing.
  4. Gate high-impact actions: introduce approval and policy checks on one agent as a pilot; tune so approvals stay rare enough to be read. Roll back by switching the gate to log-only, not by widening permissions.
  5. Harden the supply chain: allowlist MCP servers, pin versions, scan for look-alikes and re-review on change.
  6. Test adversarially: run red team exercises per injection task with repeated attempts, and retest after every model or tool change. See the AI Agent Security Testing Checklist and Red Teaming AI Agents for Identity Abuse.
  7. Prepare to respond: a tested kill switch, credential revocation and memory rollback. See the AI Agent Incident Response Playbook.

Decision guidance

  • Agent reads untrusted content and can act externally: use a constraining architecture (plan then execute, dual model or action selector) rather than relying on filters; the AI Agent Goal Hijacking Guide compares the patterns.
  • Agent only reads trusted internal data: focus on identity, tool scoping and runaway limits; injection risk is lower but insider-planted content still counts as untrusted.
  • Coding and computer-use agents: sandbox by default; these agents inherit every credential in the environment. See the Browser and Computer-Use Agent Guide.
  • Small teams: fewer tools, approval on every external send and a hosted platform's sandbox get most of the benefit. Large estates need a tool gateway, central policy and SOC detections.

Detection and measurement

The NCSC recommends logging inputs, outputs, tool use and API calls, and notes that failed tool or API calls may show an attacker refining an approach. Useful signals: tool calls not explained by the user's request, outbound requests outside the allowlist or URLs carrying encoded data, plan changes after untrusted content was read, new or changed tool descriptions, and spend or call-rate spikes.

MetricWhy it matters
Attack success rate per injection task, over repeated attemptsThe realistic measure of resistance, as CAISI recommends
Share of high-impact tool calls behind a policy or approval gateCoverage of the controls that limit blast radius
Agent sessions with a complete task, plan and tool traceWhether incidents can be investigated
Unpinned or unreviewed MCP servers and tools in useSupply chain exposure
Egress blocks from agent tools traced to injected contentEvidence of attempted exfiltration being stopped
Time from a goal-drift alert to containment in exercisesResponse readiness

Roles and ownership

RoleOwns
AI or platform engineeringAgent architecture, sandboxing, tool gateway, logging pipeline
Application securityThreat models, design reviews against ASI01 to ASI10, adversarial testing
IAMAgent identities, credential scope, revocation
Detection engineering and SOCAgent detections mapped to ATLAS and ATT&CK, triage, containment
Agent ownerRisk acceptance for what the agent may do and which content it reads
Third-party and supply chain riskApproval of MCP servers, skills and agent vendors

For executive framing, the Top 10 AI Agent Security Risks for CISOs summarises the same ground for leadership.

Standards and frameworks

Threat areaNIST SP 800-53 Rev. 5NIST CSF 2.0MITRE
Injection and untrusted inputSI-10, AC-4PR.DS-02ATLAS AML.T0051, AML.M0030, AML.M0033
Tool misuse and excessive agencyAC-6, CM-7PR.AA-05ATLAS AML.T0053, AML.M0029
Exfiltration through agent toolsAC-4, SC-7DE.CM-09ATLAS AML.T0086; ATT&CK T1567
Credential theftIA-5PR.AA-01ATLAS AML.T0083, AML.T0098; ATT&CK T1528, T1552.001
Agentic supply chainSR-3GV.SC-04ATLAS AML.T0010.005; ATT&CK T1195.002
Monitoring and responseSI-4, IR-4DE.AE-02, RS.MI-01ATLAS AML.M0032

OWASP is expanding each agentic risk into its own guidance; NHI Mgmt Group covers each entry in the OWASP Agentic Top 10 ASI01 Guide through the OWASP Agentic Top 10 ASI10 Guide, and the OWASP Top 10 for LLM Applications Guide covers the model layer.

Where to go next (all guides in this category)

Taxonomy

Manipulation of goals and state

Interfaces with special exposure

Agent failure and resource abuse

Practitioner checklist

  • Threat model every production agent: untrusted inputs, reachable data, external channels and worst action.
  • Remove tools, scopes and autonomy the task does not need before adding any detection.
  • Treat tool outputs, retrieved documents, peer agent messages and memory as untrusted input.
  • Gate destructive, financial and external-send actions with a policy check and, where needed, human approval.
  • Sandbox all code execution and restrict agent egress to an allowlist.
  • Allowlist and pin MCP servers and tools; re-review whenever a tool description or version changes.
  • Log task, plan, tool calls and egress per session and alert on off-task actions.
  • Red team per injection task with repeated attempts, and retest after model or tool changes.
  • Exercise a kill switch, credential revocation and memory rollback at least twice a year.

Standards and references

Related NHI Mgmt Group resources: Agent Identity and Access Guide · Agent Controls and Monitoring Guide · Prompt Injection Guide · MCP Security Guide · AI Agent Incident Response Playbook

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 26 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.