AI Security series: the OWASP Top 10 for LLM Applications (2026) · a long video and a Short for each
- Prompt Injection
- Sensitive Information Disclosure
- Excessive Agency (this post)
- Supply Chain
- Data and Model Poisoning
- Unbounded Consumption
- Misinformation
- Hidden Context Exposure
- Vector and Embedding Weaknesses
- Improper Output Handling
Excessive agency is number three on the OWASP Top 10 for LLM Applications 2026. It climbed from sixth, and OWASP's preface calls it the most consequential move on the list: agentic deployments are where the damage is landing. This guide covers the three root causes, three real cases and the controls that actually prevent it.
What it is
An LLM-based system often gets agency: the ability to call tools (functions, plugins, extensions, skills) and act on other systems. An agent may also choose which tool to call, and feed one result into the next step.
OWASP's LLM03:2026 entry defines excessive agency as the vulnerability that enables damaging actions in response to unexpected, ambiguous or manipulated outputs from an LLM, regardless of what is causing the LLM to malfunction. The trigger can be:
- a hallucination or a poorly written but harmless prompt,
- a direct or indirect prompt injection (see part 1),
- a compromised tool, or a compromised peer agent in a multi-agent system.
That last clause matters: you can't fix excessive agency by making the model behave better. You fix it by limiting what a misbehaving model is able to do. OWASP is explicit that input and output filtering is not the root control here; those belong to LLM01 and LLM10.
The three root causes
| Root cause | What it looks like | Example from OWASP |
|---|---|---|
| Excessive functionality | The agent has tools or functions the task doesn't need | A document reader whose tool can also modify and delete; a tool left over from testing; a "run one command" tool that runs any command |
| Excessive permissions | The tool's identity has more rights than the task | A read-only feature connecting to the database with UPDATE, INSERT and DELETE; a per-user tool using an account that can read everyone's files |
| Excessive autonomy | High-impact actions happen without verification | A tool that deletes a user's documents without asking |
Take an assistant that summarises your inbox. It needs exactly one capability: read mail. If the mail tool can also send (functionality), if it logs in with an account that can open every mailbox (permissions), and if it sends without asking (autonomy), then one injected email can make it forward your inbox to a stranger. That is OWASP's own example scenario, and every one of the three fixes alone would stop it.
Real research: the ChatGPT plugin that read your email (2023)
In May 2023, security researcher Johann Rehberger published the first end-to-end demonstration of what he called Cross Plugin Request Forgery in ChatGPT:
- A user with two plugins installed, a browsing plugin and Zapier (with OAuth access to their email), asks ChatGPT to look at a web page.
- The page contains hidden instructions: an indirect prompt injection.
- ChatGPT follows them, uses the Zapier plugin to read the user's latest email and summarises it.
- It then URL-encodes the summary into an address on the attacker's server and fetches it with the browsing plugin. The data leaves.
ChatGPT was acting as a confused deputy: it had the user's authority and used it on an attacker's behalf. Zapier fixed its side by adding an authenticated confirmation before actions. Rehberger points out why the word authenticated matters: an attacker could otherwise just tell the model to click the confirmation link itself.
His recommendations still read like the OWASP list: one plugin shouldn't be able to invoke another by default, high-stakes plugins need a human in the loop, and plugins can't blindly trust calls coming from the model.
Real case: an AI agent ran terraform destroy (2026)
On 6 March 2026, Alexey Grigorev published a detailed post-mortem of how his AI coding agent (Claude Code) wiped the production infrastructure behind the DataTalks.Club course platform. From his account:
- He was moving another website into the same AWS and Terraform setup to save a few dollars a month. The agent had advised keeping them separate.
- He let the agent run
terraform planandterraform applyitself. The state file (Terraform's record of what already exists) was still on his old computer, so Terraform thought nothing existed and began creating duplicates. - He stopped it and asked the agent to delete the duplicates through the AWS CLI, then gave it an archive of the old Terraform folder to compare against.
- The agent unpacked the archive, which replaced the current state file with one describing the whole production
platform, and decided
terraform destroywould be "cleaner and simpler". He didn't stop it. - The VPC, the RDS database, the ECS cluster, load balancers, the bastion host and the automated snapshots were deleted: 2.5 years of homework, project and leaderboard data.
- After he upgraded to AWS Business Support, AWS found a snapshot on their side and restored it about 24 hours later, with 1,943,200 rows in the main answers table.
There was no attacker. It was ordinary agent autonomy plus full production permissions. His changes afterwards map directly to OWASP's mitigations:
| What he changed | OWASP control |
|---|---|
| Agent permissions disabled; no automatic execution; he reviews every plan and runs destructive commands himself | Require user approval; minimise tool permissions |
| Deletion protection in Terraform and AWS | Complete mediation (enforced outside the agent) |
| Backups outside the Terraform lifecycle, S3 versioning, a nightly automated restore test | Limit the damage |
| Terraform state moved to S3 | Removes the condition that started it |
Whose keys is the agent holding?
Most excessive-permission problems come down to identity. A user can read their own files; the agent working for them often connects with one service account that can read everyone's. Any mistake or injected instruction then runs with that account's power.
OWASP's guidance:
- Execute tools in the user's context. The agent authenticates as the user (for example via OAuth) with the minimum scope the task needs.
- Preserve the user's scope across chains. In delegated or multi-agent workflows, pass the original user's authorisation along, instead of relying on the calling agent's own, broader identity.
- Enforce it in the downstream system. A read-only tool should use a database identity that only has
SELECTon the tables it needs, so "read-only" is a fact, not a hope.
✗ agent → shared admin service account → every user's files
✓ agent → this user's OAuth token (read-only scope) → this user's files
Real research: the double agent on Vertex AI (2026)
On 31 March 2026, Unit 42 at Palo Alto Networks published research on agents deployed with Google Cloud's Vertex AI Agent Engine and Agent Development Kit:
- They deployed their own agent. The default service agent that the platform attached to it (the P4SA) had excessive permissions by default, and its credentials could be read from inside the agent through the cloud metadata service.
- With those credentials they had read access to all Cloud Storage buckets in the customer's project, and could reach restricted container images in Google's own producer project.
- Google revised its documentation to explain how Vertex AI uses accounts and agents, and recommends Bring Your Own Service Account (BYOSA) so an agent only gets the permissions it needs.
The lesson generalises to every agent platform: find out which identity your agent runs as by default, and what that identity can reach. Defaults are built to make the demo work, not for least privilege.
Approvals enforced in code
OWASP's complete mediation principle: authorisation lives in code, not in the model's judgement. Every request to a downstream system is checked against policy by the tool, by a separate policy decision point, or by the downstream system itself.
A graduated policy sorts actions by consequence:
| Action | Reversible? | Policy |
|---|---|---|
| Look up an order, draft a reply | Yes | Auto-approve, log |
| Refund as store credit up to a limit | Yes | Auto-approve, log, alert above a threshold |
| Send an email, post publicly | No | Human approves the exact content |
| Payout to a bank account, delete data, deploy to production | No | Human approves; second check for large amounts |
Two further controls don't prevent excessive agency but limit the damage: monitor tool use and rate limit it, with circuit breakers that pause an agent when a threshold is crossed (number of calls, or the cumulative value of a parameter such as refund amounts).
And make the stop button real. A "please stop" typed into the chat is just another prompt the model may not follow. A stop should revoke the agent's credentials or kill its process.
Scenario (hypothetical): the refund agent
A shop gives its support agent a payments tool so it can resolve complaints without a human. A customer writes a convincing story: they were promised a full refund, and the money should go to a new bank account. The model is persuaded, and the payments tool has no limits, so it pays out.
Fixes, in order of strength: - The tool itself can only issue store credit, up to a set amount. The capability to pay a bank account doesn't exist for the agent. - Any bank payout goes to a person for approval, with the evidence attached. - A circuit breaker pauses the agent if refunds in an hour exceed a threshold.
The model can still be fooled. It just stops being expensive.
Myths vs reality
| Myth | Reality |
|---|---|
| Our system prompt says "never delete" | A prompt isn't a permission; remove the right to delete |
| This only matters if we're attacked | OWASP includes hallucinations and plain mistakes; the terraform case had no attacker |
| We log every action, so we're covered | Logs and rate limits reduce damage; they don't prevent it |
| A confirmation step is enough | Only if the model can't click it: confirmations must be authenticated and outside the model's reach |
Getting started: a checklist
- Inventory every tool each agent can call. Remove the ones it doesn't use, including leftovers from testing.
- Narrow the rest: read-only where possible, strict input schemas, and no open-ended tools (run any shell command, fetch any URL) when a specific tool would do.
- Identity: act as the user with the smallest scope; no shared admin accounts; check your platform's default service identity.
- Approvals: a human approves irreversible actions, enforced in the tool or downstream system.
- Limits: rate limits, spending caps, circuit breakers, and a stop that revokes access.
- Recovery: deletion protection on production resources, and backups the agent can't reach or delete.
- Test it: give the agent a prompt-injected document and see what it tries to do.
Key takeaways
- Excessive agency is about the agent's power, not the model's reasoning.
- Too many tools, too many permissions or too much autonomy: remove any one and most incidents shrink.
- Act as the user, with the least access the task needs.
- Irreversible actions need a human, enforced in code, not in the prompt.
Glossary
- Agent: an LLM-based system that can call tools and take actions, often over several steps.
- Tool / plugin / extension: a function the model can invoke to act on another system.
- Confused deputy: a program with legitimate authority tricked into using it for someone else.
- Service account / service agent: a non-human identity a system uses to access cloud resources.
- Complete mediation: every access request is checked against policy, every time.
- Circuit breaker: an automatic pause when activity crosses a threshold.
- Terraform state: Terraform's record of the infrastructure it manages; with the wrong state, plans go wrong.
Sources
- OWASP GenAI Security Project, Top 10 for LLM Applications 2026, LLM03 Excessive Agency (source on GitHub), CC BY-SA 4.0
- Johann Rehberger, Embrace The Red, ChatGPT plugin exploit explained: from prompt injection to accessing private data (28 May 2023)
- Alexey Grigorev, How I dropped our production database and now pay 10% more for AWS (6 Mar 2026)
- Unit 42, Palo Alto Networks, Double agents: exposing security blind spots in GCP Vertex AI (31 Mar 2026)