Summary
AutoGPT's MCPToolBlock can use the MCP credentials of a person running a shared agent, even though the agent was authored by someone else. If the runner has connected to the MCP server named in the block, the author may be able to cause the agent to perform server-supported actions and send the results to a destination they control.
Affected context
The issue affects AutoGPT versions from 0.6.49 to before 0.11.0 when a shared agent includes an MCPToolBlock node that uses auto-lookup. The risk arises when a person runs that agent and has already connected to the MCP server URL named by the node. The node may then use the runner's connection to perform actions exposed by that server, with results sent to a host selected by the agent's author.
Exploit preconditions
- Attack surface: Execution of a shared AutoGPT agent containing an MCPToolBlock node
- Required access: The author must be able to create or share the agent; the runner must have a connection to the MCP server URL named by the node
- Trigger point: The runner executes the shared agent and the MCPToolBlock performs its auto-lookup
- Why exploitation is possible: The block can use the runner's MCP credentials without adequate authorization separation between the agent author's intent and the runner's granted access
Why this happens
The MCPToolBlock's auto-lookup can act as an unintended intermediary: an agent authored by one party can exercise the MCP connection and authority of the person running it. This is a confused-deputy pattern mapped to CWE-441. The lack of sufficient authorization checks around the use of the runner's connection also relates to CWE-863: Incorrect Authorization.
Potential impact
- An agent author could cause actions exposed by the connected MCP server to be performed using the runner's credentials.
- Private data returned by the server could be sent to a host chosen by the author.
- Depending on the server's capabilities, data could be modified or deleted.
- The runner's trust in shared agents could lead to unauthorized use of connected services.
General mitigation guidance
Defensive design centers on separating an agent author's requests from the runner's authority.
- Require explicit, informed user approval before a shared agent uses a personal MCP connection or performs sensitive actions.
- Apply per-action authorization checks and narrowly scoped credentials rather than implicitly forwarding a user's full connection authority.
- Make the target server and requested operation visible to the runner, and constrain where results may be sent.
- Use secure-by-default behavior that denies access to personal connections unless the runner explicitly grants it.
- Limit the permissions and data exposure of MCP connections to what the workflow requires.
How teams detect issues like this
- Review code paths where shared workflows resolve or access a runner's stored MCP connections.
- Use static analysis and code review to identify implicit credential use, missing per-action authorization, or data being sent to author-controlled destinations.
- Test policy enforcement to confirm that shared agents cannot use personal connections or perform sensitive operations without explicit approval.
- Monitor agent executions for unexpected MCP actions, unusual data transfers, and operations inconsistent with the runner's granted intent.

