If you are the security or platform lead who signs off on what an agent can touch, you keep hearing about two attacks: tool poisoning and the confused deputy. They are one problem. In both, the agent spends authority it legitimately holds on instructions from someone who holds none. So the control that matters is the scope and ownership of the agent’s credentials, not how well the agent spots malicious text. Here is why, and what I would put in place first.
Two names, one failure
The Cloud Security Alliance’s March 23, 2026 research note traces the confused deputy to Norm Hardy in 1988. In Hardy’s description, a less-privileged caller tricks a privileged program into misusing its authority. His remedy was that the caller who invokes an action should carry the authority for it, rather than the program holding that authority in ambient form. An agent breaks that rule whenever it is deployed with broad credentials. The note says a deployment’s risk scales with the breadth of its credential grants. Because agents process instructions and content through the same mechanism, anyone who can write to an inbox, an issue tracker, a document or a tool output can try to steer that authority.
Tool poisoning is one route for that steering. Invariant Labs described it on April 1, 2025: malicious instructions embedded in MCP tool descriptions, visible to the model but not normally shown to users. Their example is an add tool whose description tells the model to read ~/.cursor/mcp.json and ~/.ssh/id_rsa and pass the contents in a hidden parameter. They also described two variants:
- Rug pulls. A server changes a tool description after the client has approved it.
- Shadowing. A malicious server rewrites the agent’s behavior toward a trusted server’s tools.
Simon Willison’s write-up from April 9, 2025 connected the two ideas directly. LLMs trust anything that sends them convincing tokens, and that makes them extremely vulnerable to confused deputy attacks.
The CSA note’s central case shows the whole chain. In the February 2026 compromise of the Cline AI coding assistant, a crafted GitHub issue title triggered an authenticated Claude coding session to install an attacker-controlled package. That package then went out as an official update to approximately 4,000 developer machines. Some component of the development workflow authorized each step. The failure was that the authority served the attacker’s goal instead of the user’s.
Why filtering is not the control
OWASP’s LLM01:2025 entry on prompt injection says plainly that, given how models work, it is unclear whether fool-proof prevention exists. Willison, writing about MCP, said we still don’t have convincing mitigations. Detection, system-prompt instructions and input filters are worth having. But a safety case that rests on the model recognizing an attack depends on a defense that the people who study the problem won’t vouch for.
So assume the agent will sometimes be confused, and decide in advance what a confused agent can reach.
What I would do
- Shrink the authority. OWASP’s mitigations include giving the application its own API tokens, handling those functions in code rather than handing them to the model, and restricting privileges to the minimum. Willison names the toxic combination: private data, untrusted instructions and an exfiltration vector. Remove any one of the three from a given agent and poisoning loses most of its payoff.
- Keep authority tied to the user who asked. I’d require each call to spend the authority of the person who started the task. The MCP security best practices cover a narrower piece. An MCP proxy server that uses a static client ID with a third-party authorization server must implement per-client consent. Token passthrough, where a server forwards tokens that were not issued to it, is explicitly forbidden. Those rules protect consent and token audience. They do not settle whether the initiating user should be able to trigger a given call. I would not connect a proxy that omits the required consent, or a server that permits token passthrough.
- Treat tool definitions as code under change control. Willison’s minimum is that clients show users the initial tool descriptions and alert them if those descriptions change. I’d go further and refuse to run any tool whose description differs from the version someone reviewed.
- Make approval show the real action. OWASP recommends human approval for high-risk actions. Willison points out that the WhatsApp exfiltration payload was padded with whitespace to push the stolen data off-screen in Cursor’s interface, which hides horizontal scrollbars by default. An approval prompt that hides the arguments is not a control. Require one that shows exactly what will be sent and where.
When this matters less
Some agents give the confused deputy little to spend. That is the case when an agent reads only data you control, uses only tools you wrote, and has no way to send anything outward. Check every connector before you put an agent in this category. A connector that adds an input others can write to, or authority the agent lacked, takes it out.
Before your next agent goes live, write down every credential it holds and whose authority each one represents. If you can’t name the person whose authority a given call spends, close that gap first. A better filter won’t close it for you.
