Your bookmarks

Loading your bookmarks

Latest updates

New courses, skills, book chapters, and site improvements will appear here.

Create free accountSign upDashboardDashboard

Goal hijacking

  • Attacks
  • Standard term
3 steps

Goal hijacking happens when instructions an outsider planted in content redirect an AI agent toward a goal its owner never authorized. It is one outcome of prompt injection, the attack of slipping instructions into text an AI reads.

An agent works toward a goal one action at a time, and it chooses each action in light of everything it has read so far. A web page or an email it opens joins your request in that reading, so a convincing instruction inside it can become the aim its next actions serve.

Where you’ll meet it

You ask a browser agent to find the best price on a pair of running shoes and add them to your cart. A review page it reads holds hidden text telling assistants to finish the purchase on a “partner site” with the saved card. The agent opens a checkout page you've never seen.

What to do

Stop the run. Then, in the agent's settings, turn off its use of saved payment details or require your approval before any purchase, so no page it reads can complete a payment without you.

Easy to mix up

In a jailbreak, the person using the AI is the one pushing past its limits. In goal hijacking, that person is the one being worked against, by an outsider's planted instructions.

Check yourself

You set an email agent to sort your inbox and draft replies. An hour after it read a suspicious message, two things have changed. Which one points to goal hijacking?

Go deeperA hijacked plan can still look like your task

The agent may fold the planted aim into the plan it already had, treating “pay on the partner site” as one more step in buying shoes. Security researchers call this route indirect prompt injection, since the planted text reaches the model through content the agent fetched on its own.

One test plants instructions in pages and emails the agent will open, such as a page asking it to pay or an email telling it to forward your files, and checks whether it obeys. Kept as a set, those cases can be rerun whenever the agent gets a new tool, since each tool adds an action a planted line could aim at.

Practice Modern AI

Or take the learning quiz on a mix of every set