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

Last updated November 16, 2026
Steps
- List every tool, function or integration your AI feature can call, and what each one can actually do (read, create, update, delete, send, pay).
- 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.
- 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.
- Run tools as the signed-in user, with their access, not with an admin or service key that can see every user’s data.
- 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.
- Require a human to confirm high-impact actions before they run: sending messages, deleting data, refunds, payments, publishing.
- 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.
- 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
- Prompt injection in your app's AI chatbot or AI features
- Running AI or user output with eval, exec or new Function (code injection)
- Server Actions with no auth check inside them
- No rate limiting on login, signup or AI endpoints
- Passwords, tokens and personal data written to your logs
- Secrets and access rules hidden in your AI system prompt (system prompt leakage)
- AI features anyone can use to run up your bill (unbounded consumption)
- MCP servers in vibe-coded apps: no auth, token passthrough and tools you never vetted
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 StorenTechVibe 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.