Security concept

AI Security, part 3: excessive agency.

13 Nov 2026SpiderCob Security Research10 min read
Security conceptAI Security · Part 3 of 10OWASP LLM03

Short on time? Watch the 60-second Short

Excessive agency
OWASP LLM03:2026

An AI agent can take damaging actions in response to an unexpected, ambiguous or manipulated model output, because it has more functionality, permissions or autonomy than its task needs.

TL;DR

On this page

AI Security series: the OWASP Top 10 for LLM Applications (2026) · a long video and a Short for each

  1. Prompt Injection
  2. Sensitive Information Disclosure
  3. Excessive Agency (this post)
  4. Supply Chain
  5. Data and Model Poisoning
  6. Unbounded Consumption
  7. Misinformation
  8. Hidden Context Exposure
  9. Vector and Embedding Weaknesses
  10. 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:

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:

  1. 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.
  2. The page contains hidden instructions: an indirect prompt injection.
  3. ChatGPT follows them, uses the Zapier plugin to read the user's latest email and summarises it.
  4. 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:

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:

✗ 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:

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

  1. Inventory every tool each agent can call. Remove the ones it doesn't use, including leftovers from testing.
  2. 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.
  3. Identity: act as the user with the smallest scope; no shared admin accounts; check your platform's default service identity.
  4. Approvals: a human approves irreversible actions, enforced in the tool or downstream system.
  5. Limits: rate limits, spending caps, circuit breakers, and a stop that revokes access.
  6. Recovery: deletion protection on production resources, and backups the agent can't reach or delete.
  7. Test it: give the agent a prompt-injected document and see what it tries to do.

Key takeaways

Glossary

Sources

Security concepts, explained simply.Video explainers on YouTube, write-ups here.

Subscribe on YouTube

Using AI agents?Spidercob: open-source guardrails that stop them leaking your secrets and personal data. Free, one container.

Get it on GitHub