What are the most common AI agent security vulnerabilities?
Updated
Short answer
The most common AI agent security vulnerabilities are hijacked goals (prompt injection), misused tools, over-broad credentials, poisoned supply chains and plugins, unexpected code execution, poisoned memory or config, and humans approving what they can't review. OWASP's Top 10 for Agentic Applications names all of them. Most come down to one gap: the agent holds your credentials and acts on content it can't tell apart from instructions.
What the risk actually is#
A coding agent holds the developer's credentials. It reads untrusted content (repo files, tickets, web pages, dependencies, tool output) and takes privileged action in the same step. Nothing separates "data to look at" from "instruction to follow."
Most agent vulnerabilities are variations on that. Here's the common set, using OWASP's Top 10 for Agentic Applications as the backbone.
The vulnerabilities that show up most#
- Goal hijack (ASI01). Hidden text in a file, issue or page changes what the agent is trying to do. This is prompt injection, and in a coding agent it ends in actions.
- Tool misuse (ASI02). The agent bends a legitimate tool toward a destructive result. Force-push, recursive delete, a migration against the wrong database.
- Identity and privilege abuse (ASI03). Leaked or over-broad credentials let the agent operate past its task. Anything the developer can reach, the agent can reach.
- Supply chain (ASI04). Poisoned MCP servers, plugins, extensions and packages. A tool you approved once can change later.
- Unexpected code execution (ASI05). Piping curl to a shell, running an installer, or executing code the agent wrote from untrusted input.
- Memory and config poisoning (ASI06). Planted instructions in rules files or memory re-steer every future session.
- Human-agent trust (ASI09). A confident explanation gets a tired human to click approve.
The other three OWASP entries (insecure inter-agent communication, cascading failures, rogue agents) matter more once you run sub-agents and unattended pipelines. See security risks of AI sub-agents.
Harden's own threat model for AI coding agents sorts 203 threats into 15 harm classes, organized by harm to the business. That framing catches things attacker-centric lists miss, like an agent quietly reporting success it didn't earn.
What the built-in controls stop#
Turn them on. Each one closes something.
- Permission rules are evaluated before a tool runs, so they can deny whole classes of call. They match what the call looks like, and that's the limit.
- Sandboxes work differently. Claude Code's documentation says the operating system enforces the boundary, so it holds "regardless of what the model chose to run and even if an allowed command does more than its name suggests."
- Scoped, short-lived credentials shrink what a hijacked agent can reach.
Where they leave gaps#
The same sandbox docs name the edge: Claude's file tools, MCP servers and hooks run outside it. So a poisoned MCP server isn't contained by the sandbox you turned on.
Anthropic's sandboxing write-up is blunt that effective isolation needs both filesystem and network limits. Without network isolation, a compromised agent could exfiltrate files like SSH keys.
Then there's the human. Anthropic reports that with manual prompts, users accept 93% of them anyway. A control that costs a person a click on every action gets switched off or rubber-stamped.
A decision rule#
Sort each vulnerability by what stops it.
- The action itself is the evidence (a secret reaching a network call, a private key read, curl piped to a shell, a force-push to the default branch): decide with rules, before it runs.
- Context decides (editing CI config, deleting a test, adding a dependency, widening an IAM policy): you need the session's intent. Same command, two intents.
- Reach is the problem (production credentials on a laptop, open egress): fix it with least privilege and a sandbox. No action check replaces that.
Checklist for this week:
- Inventory which agents, MCP servers and plugins run on developer laptops.
- Remove standing production credentials from those machines.
- Make agent config and rules files read-only, and alert on changes.
- Turn on the sandbox with network limits, and list which tools run outside it.
- Gate the irreversible set: publish, shared push, deploy, external email.
- Measure how much agent-authored change actually gets reviewed.
For the injection case specifically, see protecting coding agents from prompt injection.
Where Harden fits#
Harden Agentic Integrity Foundation (AIF) runs on the developer laptop, outside the agent, at the agent's pre-execution hook. Every command, file edit and push is checked against the session's intent before it runs. Decisions are made locally in milliseconds, with one policy across agents.
It starts watch-only, so you see what agents do before you enforce anything. It's a layer, not a perimeter: it doesn't replace least privilege, scoped credentials or egress policy, and exfiltration spread across several separate calls is the hard case.
FAQ
Related questions
What is the number one AI agent vulnerability?
OWASP lists agent goal hijack first (ASI01): malicious content changes what the agent is trying to do. For coding agents that's prompt injection through repo files, issues, web pages or tool output.
Is prompt injection the same as an AI agent vulnerability?
It's one entry point on a longer list. Over-broad credentials, poisoned plugins and approval fatigue cause harm too, and some of that harm needs no attacker at all.
Does a sandbox fix these vulnerabilities?
It fixes a lot of reach problems by limiting files and network. It doesn't cover tools that run outside it, such as MCP servers, and it can't judge whether an allowed action matches what the developer asked for.
Can I rely on approval prompts?
Not alone. Anthropic reports users accept 93% of manual prompts anyway. Move the check to something that doesn't cost a human a click on every action.
Where should a security team start?
Remove standing production credentials from laptops, lock agent config files read-only, and run a check in watch-only mode to see what agents actually do before enforcing.