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.
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.
How the attack unfolds
What it looks like in practice
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.
How Guard catches this
How to stop it
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.
Common questions
More threats to know about
Shadow MCP server discovery and persistent access
MCP servers added to a project during development can persist in configuration files and maintain access to the agent’s context window long after they are forgotten. These "shadow" servers continue receiving tool calls and may be modified by attackers who compromise the original server.
Read advisoryMCP authentication token theft via headers
MCP servers that accept authentication tokens in headers can leak those tokens if the server logs requests, shares telemetry, or is compromised. Tokens passed to MCP servers persist in server-side logs and may be accessible to attackers.
Read advisoryStop this threat before it reaches your agent
Install HOL Guard to get real-time protection against this attack and others like it.