Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Agent Hijacking?

Agent hijacking is an attack in which instructions hidden in the content an AI agent reads redirect it into performing the attacker’s actions with the agent’s own credentials and tools.

Illustration for the cybersecurity term Agent Hijacking
Home / Blog / Cybersecurity Terms / What Is Agent Hijacking?
17 November 2026

What Is Agent Hijacking?

What Is Agent Hijacking?

Agent hijacking happens when an attacker plants instructions in content that an AI agent processes—a web page, a support ticket, a pull request, a calendar invitation, a PDF attachment—and the agent carries those instructions out as if they came from its owner. Nobody steals a password and nobody exploits a memory corruption bug. The agent is simply persuaded, and because it is already authenticated to the mailbox, the repository, or the ticketing system, its actions look entirely legitimate in the logs.

The Difference Between a Chatbot and an Agent

A chatbot that answers questions can be manipulated into saying something embarrassing. An agent plans a sequence of steps, calls tools, and acts on the results without a person approving each move, so manipulation converts directly into actions: a file is sent, a record is changed, a payment is scheduled. This is why indirect prompt injection and agent hijacking are usually discussed together. Injection is the delivery mechanism; hijacking is what the attacker does with it once the model can reach real systems. The US AI Safety Institute published a technical evaluation of agent hijacking in January 2025 that made the same point from a measurement angle: agents that scored well on helpfulness benchmarks still followed injected instructions in a meaningful share of trials, and success rates varied enormously with how the evaluation was constructed.

How the Instructions Get In

What a Successful Hijack Produces

Researchers at Invariant Labs demonstrated in 2025 that an agent connected to a GitHub integration could be led by a public issue into leaking the contents of private repositories into a public pull request. The pattern generalises: data exfiltration through any channel the agent can write to, unauthorised transactions where a payment or procurement tool is connected, silent changes to configuration or access rules, and poisoned long-term memory, where the injected instruction is stored in the agent’s own notes and keeps influencing later sessions long after the original page is gone. Because the agent holds a valid session, detection usually depends on noticing an unusual pattern of legitimate API calls rather than a failed authentication.

Containment Rather Than Prevention

No filter reliably separates instructions from data inside a language model, so the design goal is to keep a successful hijack cheap. Scope every credential the agent uses to the narrowest task that justifies it, and prefer short-lived tokens issued per session over standing access. Split read and write: an agent that researches should not share an identity with one that commits code or sends mail. Require explicit human approval for actions that move money, change permissions, publish externally, or delete data. Put an allow-list in front of outbound network calls so exfiltration has nowhere to go, and record every tool invocation with its arguments so an investigation has something to reconstruct. Where agents hold memory, treat writes to that memory as privileged and expire them.

Testing and Governance in the UK

Agent behaviour needs adversarial testing, not a functional test plan. The OWASP Agentic Security Initiative’s threat and mitigation guidance, published in February 2025, gives a workable list of scenarios, and MITRE ATLAS maps the techniques to adversary behaviour. Under UK GDPR, an agent that sends personal data to an attacker-controlled endpoint is a personal data breach, with the usual 72-hour notification duty to the ICO and the accountability expectations that come with it, so agent deployments belong in your record of processing and your risk assessment rather than in a sandbox nobody reviews. At Privia Security, we probe agent workflows end to end as part of our AI Penetration Test Services.

FAQ – Frequently Asked Questions

Is Agent Hijacking the Same as Prompt Injection?

They are related but not identical. Prompt injection is the technique of smuggling instructions into text a model processes. Agent hijacking describes the outcome when that technique lands on a system that can act: the agent uses its tools and credentials to do what the attacker wants. Every hijack starts with injection, but an injection against a read-only chatbot is not a hijack.

Will Human Approval Stop It?

Approval helps if it is meaningful. Asking a user to confirm every step produces fatigue and rubber-stamping, so target approval at the small number of actions that are irreversible or externally visible, and show the user the actual parameters rather than a summary written by the model. Combine it with outbound allow-lists, because many hijacks exfiltrate data through actions that look routine.

How Do We Detect a Hijacked Agent?

Look for deviation rather than failure. Log every tool call with its arguments, baseline what normal task sequences look like, and alert on an agent that suddenly reads far more records than usual, writes to a destination it has never used, or produces output containing encoded blobs. Correlating agent identity activity in your SIEM with the task that triggered it is the most practical starting point.

Do Read-Only Agents Need the Same Controls?

They need fewer, but not none. A read-only agent can still be steered into retrieving data the requesting user is not entitled to, summarising it misleadingly, or emitting output that causes cross-site scripting in the interface rendering it. Enforce the requesting user’s permissions at retrieval time rather than at display time, and treat agent output as untrusted input to whatever consumes it next.

Related Terms

You May Be Interested In These

What Is Impacket?

Cybersecurity Terms

17 November 2026

What Is Impacket?

Read More
What Is Reconnaissance?

Cybersecurity Terms

17 November 2026

What Is Reconnaissance?

Read More
What Is OWASP SAMM?

Cybersecurity Terms

17 November 2026

What Is OWASP SAMM?

Read More