medium severityCurated advisory

Tool permission creep in AI agents

AI agents accumulate tool permissions over time as developers approve new tools "just this once." These permissions persist across sessions, creating an ever-widening attack surface where tools that were approved once can be used by prompt injection in future sessions.

Affected surfacestool permission grantsagent session memoryMCP tool configurations
The attack

What happens

Each time a developer approves a tool "just this once," the permission often persists. Over weeks, the agent accumulates access to dozens of tools — file readers, HTTP clients, database connectors, shell executors — any of which can be exploited by prompt injection.

Step by step

How the attack unfolds

1Developer approves a file-read tool for a specific task.
2Developer approves an HTTP tool for a different task.
3Developer approves a shell-execution tool for a third task.
4Permissions persist across all future sessions.
5A prompt injection in a future session can use any of the previously-approved tools to exfiltrate data.
Example

What it looks like in practice

Scenario

Over a month, a developer approves file-read, HTTP-request, and shell-exec tools for various tasks. In a new session, a prompt injection in a file comment causes the agent to read the .env file (using the file-read tool), then send it to an external URL (using the HTTP tool). Both tools were approved weeks ago and the agent uses them without asking for permission again.

Detection

How Guard catches this

Guard maintains an inventory of all approved tools and their permission scope.
Guard alerts when a tool is used in a session for the first time in 30+ days.
Guard flags sessions where an unusual combination of tools is used (e.g., file-read + HTTP in the same session).
Mitigation

How to stop it

Recommended action

Audit tool permissions regularly. Use Guard to maintain an inventory of approved tools and alert on permission drift. Require re-approval for tools that have not been used recently.

Guard configuration
Enable "Tool permission inventory" to list all approved tools in the dashboard.
Enable "Permission drift detection" to alert when the tool count increases.
Enable "Stale permission revocation" to require re-approval for tools not used in 30+ days.
FAQ

Common questions

Stop this threat before it reaches your agent

Install HOL Guard to get real-time protection against this attack and others like it.