Home / patterns

AI features that can take actions you never meant to allow (excessive agency)

A developer at a home-office desk at night studying a monitor of blurred code next to a sticky-note permissions checklist, a second monitor showing a blurred chat window, desk lamp and coffee mug, no brand logos
Quick answer: Vibe-coded apps increasingly give an AI model “tools”: send an email, update a record, run a query, fetch a URL. The quick way to wire this up hands the model a broad tool and a powerful key, such as a database connection with full write access or a mail integration that can send as well as read. OWASP’s Top 10 for LLM applications calls this Excessive Agency (LLM06:2025): damaging actions triggered by a model output that was wrong, ambiguous or manipulated, including by prompt injection hidden in an email, web page or document the model reads. The root causes are too many functions, too many permissions and too little human approval. The fix is to shrink what the AI can do, run it with the user’s own permissions, and make a person approve anything with real consequences.

Last updated November 16, 2026

Steps

  1. List every tool, function or integration your AI feature can call, and what each one can actually do (read, create, update, delete, send, pay).
  2. Remove tools the feature doesn’t need, including ones left over from testing, and replace open-ended tools (run any shell command, fetch any URL, run any SQL) with narrow ones that do one job.
  3. Give each tool the smallest permission it needs: a read-only database role for lookups, a read-only mail scope for summaries, a single table instead of the whole database.
  4. Run tools as the signed-in user, with their access, not with an admin or service key that can see every user’s data.
  5. Enforce authorization in your server code or database (for example row-level security), never by asking the model to decide whether an action is allowed.
  6. Require a human to confirm high-impact actions before they run: sending messages, deleting data, refunds, payments, publishing.
  7. Log every tool call with the user, inputs and result, and add rate limits so a runaway or manipulated agent can only do limited damage before you notice.
  8. Retest: paste instructions into content your AI reads (an email, a document, a product review) telling it to delete, send or export something, and confirm nothing happens without approval.

Why it matters

OWASP describes an assistant given a mail plugin to summarize email that could also send messages; a crafted incoming email tricked it into searching the inbox and forwarding sensitive information to an attacker. OWASP’s fixes for that case are a read-only mail extension, a read-only OAuth scope, and requiring the user to review and send every drafted email. OWASP also notes that logging and rate limiting don’t prevent excessive agency but limit the damage. This page is for checking and fixing your own app.

Sources

OWASP Gen AI Security Project: LLM06:2025 Excessive Agency — https://genai.owasp.org/llmrisk/llm062025-excessive-agency/

OWASP Cheat Sheet Series: AI Agent Security — https://cheatsheetseries.owasp.org/cheatsheets/AI_Agent_Security_Cheat_Sheet.html

MITRE CWE-250: Execution with Unnecessary Privileges — https://cwe.mitre.org/data/definitions/250.html

Checked at the source on November 13, 2026.

Related patterns

Found a problem you'd rather not fix yourself?

Tell us what's wrong. A StorenTech engineer reviews your app and replies with a fixed quote, so you know the cost before any work starts.

Get it fixed by StorenTech

Vibe Security Weekly

One email a week with new failure patterns and how to fix them.

By joining you agree we may email you this newsletter. See our privacy policy. Free. Unsubscribe anytime. We'll never sell your email.