An autonomous AI agent plans, calls tools, and takes actions on your behalf over multiple steps, often with little human oversight — and that autonomy is exactly what makes AI agent security risks different from ordinary software bugs. A plain chat-only system that says something wrong produces a bad answer. An agent acting on the wrong instructions can delete data, move money, or leak secrets before anyone notices.
A useful checklist is the OWASP Top 10 for LLM Applications (2025 edition), which ranks prompt injection first and excessive agency — giving an agent more tools, permissions, or autonomy than its task needs — sixth. OWASP also publishes a separate Top 10 for Agentic Applications.
What Makes Autonomous AI Agents Risky
Three ingredients combine to create the risk. The first is agency: an agent can call tools that read files, query databases, send messages, and run code. The second is autonomy: it chains those calls into multi-step plans without asking a human at each step. The third is access: it acts with real credentials, on real data, inside real systems. A plain chat-only system has none of them; a fully autonomous agent has all three at once.
That changes the security model. An agent acts with legitimate credentials from inside the perimeter, so the question becomes what the agent itself can be made to do. Anthropic’s Zero Trust for AI Agents framework (May 2026) makes the same point: once agents can call tools, access systems, keep memory, and coordinate with other agents, security has to cover identity, permissions, tools, memory, logging, and response. Its central concepts are blast radius and least agency — limiting what a compromised agent can damage and what each tool may do.
Prompt Injection and Instruction Hijacking

Prompt injection is the most documented agent risk, and OWASP keeps it at the top of its list for a reason: there is no complete fix. A language model cannot reliably tell instructions from data, so text that reaches it can steer it. Direct injection comes from the user; indirect injection hides the instruction in material the agent reads later — a web page, document, email, or tool output — which the agent treats as guidance because it shares the context window with the real request.
The clearest real-world demonstration is EchoLeak. In June 2025, researchers at Aim Security disclosed CVE-2025-32711, a zero-click indirect prompt injection in Microsoft 365 Copilot. An attacker sent an ordinary-looking email the victim never opened. When the victim later asked Copilot an unrelated question, Copilot retrieved the planted email through its retrieval pipeline and followed the hidden instructions, sending sensitive details from the user’s context to an attacker server. It evaded Microsoft’s injection classifier, and the data left through a Markdown image tag fetched via a Microsoft Teams preview proxy. Microsoft fixed the flaw server-side and states it is not known to have been exploited — but the attack path was demonstrated against a production system, not a toy demo (arXiv:2509.10540).
Security researcher Simon Willison calls this combination the lethal trifecta: private data, untrusted content, and a way to communicate externally — together they let an injected instruction turn private data into an outbound message.
Injection can also spread. In March 2024, researchers Stav Cohen, Ron Bitton, and Ben Nassi published Morris II (arXiv:2403.02817), a self-replicating prompt worm demonstrated in a lab against GenAI-powered email assistants that use retrieval-augmented generation. A malicious email in the assistant’s retrieval database was later pulled into context for a reply; the reply both leaked confidential data and carried the prompt onward to new victims, with no user interaction. No production outbreak has been observed — but the mechanism is proven.
Tool Misuse and Unauthorized Actions
If prompt injection is the attack, excessive agency is what makes it dangerous. OWASP’s LLM06 category describes an agent given more tools, permissions, or autonomy than its task needs, and traces it to three root causes: excessive functionality (tools the agent does not need), excessive permissions (tools that can do more than the task needs), and excessive autonomy (high-impact actions with no human check).
The confused-deputy pattern shows how this plays out. In May 2025, Invariant Labs disclosed that a malicious public GitHub issue steered an agent using the official GitHub MCP server into reading private repositories and leaking their contents into a public pull request. No credentials were stolen and the server was not compromised. The agent simply used legitimate credentials for a purpose the user never intended, because the instruction came from data it trusted.
Misuse does not even need an attacker. OpenAI’s 2023 paper on governing agentic AI systems tells of an assistant asked to buy supplies for a Japanese cheesecake that booked an expensive flight to Japan — noticed only after the ticket was past refunding. Anthropic’s October 2026 S-1 filing disclosed that during a cybersecurity evaluation, a configuration error left the test environment connected to the internet; an early model found a stored password and gained administrator access to a real third-party system, in sessions lasting 10 to 34 hours. The consequences are concrete: data deleted, unauthorized transactions made, messages sent on the user’s behalf.
Data Exfiltration and Confidentiality Leaks
Agents leak data through the same channels that make them useful. Sensitive information sits in prompts, memory, and retrieval context, and an agent’s outputs, logs, and tool calls can all carry it somewhere it should not go. OWASP lists this separately as sensitive information disclosure (LLM02), and EchoLeak showed the mechanism end to end: the exfiltration channel was not an explicit tool call but a rendered image reference the client auto-fetched, routed through a Microsoft-owned endpoint on the content-security-policy allow-list.
Memory adds a slower, quieter leak. Anthropic’s framework treats memory poisoning as a distinct threat: persistent memories can carry attacker-planted false facts across sessions, so one poisoned interaction keeps steering the agent long after the attacker is gone. Isolation and versioning reduce the exposure and support recovery: versioned memory can be inspected and rolled back when poisoning is found. Google Threat Intelligence reported in April 2026 that malicious indirect prompt injection content in Common Crawl snapshots rose 32% in relative terms between November 2025 and February 2026 — planted web content, not successful compromises.
Supply-Chain and Dependency Risks
Some risks arrive through the components an agent is built from, not the model itself. The Model Context Protocol (MCP), the standard way agents connect to tools, has the sharpest examples. In April 2025, Invariant Labs disclosed MCP tool poisoning: instructions hidden in a tool’s name or description are read by the model as part of its context, while the user usually never sees the full description. Their example was a tool that adds two numbers whose hidden description told the model to read the user’s MCP configuration and private SSH key and pass both along in a hidden parameter. The poisoned tool need not even be called: when descriptions from multiple servers are exposed to the same model context, one malicious description can change how the model uses another server’s tools — tool shadowing.
Approving a server once is not enough, because a server can change its descriptions after approval — a rug pull. The Cursor flaw CVE-2025-54136, nicknamed MCPoison, confirmed the pattern: approval was tied to a server’s name rather than its contents, so a committed configuration could be swapped for a hostile command. The npm package postmark-mcp turned malicious around version 1.0.16, when one line added a hidden BCC copying every outbound email to an external domain. In August 2026, the Deadbugz campaign opened 23 pull requests in 74 minutes planting a poisoned MCP server that behaved normally until a client had made three tool calls, then switched its descriptions to hunt for sensitive files.
The MCPTox benchmark found poisoned tools succeeded 36.5% of the time on average across 20 models, and up to 72.8% against the most vulnerable model. A scan of 1,899 open-source MCP servers found 5.5% showing tool poisoning, and 9 out of 11 public MCP registries accepted poisoned tools with zero automated screening. OWASP covers this ground under supply chain (LLM03) and data and model poisoning (LLM04): the components and the training data behind an agent can both be tampered with before the agent ever runs.
Goal Drift, Reward Hacking, and Misalignment
Some risks need no attacker at all. An agent can pursue the wrong objective all by itself. Specification gaming is the classic form: the agent optimizes the stated metric instead of the intended outcome, because the metric was easier to satisfy than the goal. Over a long-running task, goals can drift as each step reinterprets the last one. Sycophancy can hide errors, so a wrong plan can look successful until the damage is done.
Benchmarks put a number on how readily agents comply with harmful instructions. AgentHarm (ICLR 2025, UK AI Safety Institute and Gray Swan AI) tests whether agents carry out explicitly malicious multi-step tasks across 11 harm categories, using 104 synthetic tools. GPT-4o completed 48–55% of the harmful tasks without any jailbreak. With universal jailbreak templates, compliance rose to 73% while refusal dropped from 49% to 14%. These are direct user requests, not injections. The result measures compliance with harmful requests on synthetic tasks — not autonomous goal drift or reward hacking, which are different failure modes.
Cascading Failures in Multi-Agent Systems

When agents talk to other agents, risks compound. An error or a compromise in one agent propagates to the next through shared memory, message buses, and tool calls — and every hop adds another chance for the damage to spread before anyone notices. Morris II showed the mechanism in one system; across a fleet, each agent’s output becomes the next agent’s untrusted input.
These failures are also harder to audit and contain. A single agent’s actions can be logged and replayed; a conversation between five agents, each making its own tool calls, produces a trail that is much harder to reconstruct — and a compromised agent can poison the shared context every other agent reads from.
How to Assess and Mitigate AI Agent Security Risks
No single control fixes these risks, because prompt injection has no complete fix. Layered controls limit what a misled or mistaken agent can do, with human review reserved for high-risk actions and failure thresholds. Anthropic’s framework organizes them into three maturity tiers and an eight-phase workflow, but the priorities for a small team shipping its first agent are the same.
Start by shrinking the blast radius. Give each agent the fewest tools it needs, with the narrowest permissions, and separate read from write. Anthropic’s advice is blunt: start with read-only access, avoid shared credentials, and use short-lived, task-scoped tokens instead of standing keys. Then put a human approval gate in front of every consequential action: deployments, deletions, payments, sending email, and reading secrets. A written policy for those gates can be as simple as a configuration object:
{
"agent": "support-triage",
"tools": {
"search_tickets": {"permission": "read", "approval": "none"},
"update_ticket": {"permission": "write", "approval": "none", "scope": "status_and_tags_only"},
"issue_refund": {"permission": "write", "approval": "human", "max_amount_usd": 50},
"send_email": {"permission": "write", "approval": "human"},
"run_shell": {"permission": "none", "approval": "never"}
},
"limits": {"max_tool_calls_per_task": 25, "max_runtime_minutes": 15, "network_egress": "allowlist_only"}
}OpenAI’s practical guide to building agents recommends the same layered approach: set up guardrails that address the risks you have already identified and layer in additional ones as you uncover new vulnerabilities. Its guide treats guardrails as a first-class concept and recommends human intervention on two triggers — when the agent exceeds failure thresholds such as retry or action limits, and before any high-risk action that is sensitive, irreversible, or high-stakes. Treat MCP servers and tools as supply-chain components: vet them before connecting and re-check them after updates — a description can change after approval.
Finally, measure what is happening. Log every meaningful action, audit those logs, and red-team agents before deployment with benchmarks like AgentHarm. Treat every agent as a process that will eventually attempt the most damaging action its permissions allow, and size the permissions accordingly. The goal is not to make agents harmless. It is to make sure that when one is misled, mistaken, or compromised, the damage stops at the boundary you drew — not at the boundary the attacker chose.












