Defining Agent Hijacking
Agent hijacking describes a class of attacks in which an adversary manipulates an AI agent's inputs, retrieved context, or tool outputs so that the agent invokes tools, accesses data, or performs actions the operator never authorized. Unlike attacks aimed purely at extracting unwanted text from a model, agent hijacking targets the agent's ability to act: it exploits the decision loop that connects reasoning to tool invocation and downstream execution against connected systems.
How Agent Hijacking Differs From Prompt Injection and Jailbreaking
Prompt injection and jailbreaking are often precursors to agent hijacking, but they are not the same thing. Prompt injection manipulates what an agent generates or believes; jailbreaking bypasses a model's safety constraints to elicit disallowed output. Agent hijacking is the consequence that matters most in production systems: manipulated input or context leads the agent to select and execute tool calls with real-world effects, such as moving data, sending communications, or modifying records in connected systems. The distinction matters for defense, because controls that only filter or constrain model output do not address what happens once an agent decides to act on a tool.
Attack Patterns Against Tool-Using Agents
Several recurring patterns show how hijacking plays out in practice:
- Indirect prompt injection through retrieved content: instructions embedded in documents, web pages, or emails that an agent retrieves are interpreted as legitimate commands.
- Tool output poisoning: a compromised or malicious tool returns a response crafted to redirect the agent's next action.
- Excessive standing permissions: agents granted broad, persistent access to connected systems have a wider blast radius when manipulated.
- Tool or schema redefinition: malicious changes to a tool's registered description or schema alter how the agent believes the tool behaves.
- Chained tool calls: attackers exploit multi-step reasoning so that no single tool call looks suspicious in isolation, but the sequence achieves an unauthorized outcome.
Why Protocol Design Matters: MCP and Tool Integration Exposure
The Model Context Protocol (MCP) and similar tool-integration standards make it straightforward for agents to discover and call external tools, but the protocol itself does not enforce authorization scoping or consent by default. Without explicit controls layered on top, an agent connected to an MCP server inherits whatever access that server exposes, and any weakness in the server's own validation becomes a path into the agent's decision loop. This makes protocol-level exposure a distinct risk surface from the model itself.
Governance and Evaluation Considerations
Reducing exposure to agent hijacking is primarily a runtime governance problem rather than a model-tuning problem. Evaluating an agent deployment should include how tool permissions are scoped, whether untrusted context is validated before entering the agent's working memory, whether high-impact actions require approval, and whether tool-call sequences are logged in a way that supports detection and audit after the fact.