Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

WeaknessASC-2026-0001Major weakness

Agent goal hijack via untrusted content (prompt injection)

HighWorkarounds only

Instructions hidden in web pages, documents, emails or tool output redirect the agent's goal, so it acts for the attacker instead of the user.

How to detect it

  • Untrusted content (retrieved pages, files, tool output) contains instruction phrases, role markers or hidden Unicode
  • The agent's actions change right after it reads untrusted content
  • Hijack tests (probes) get the model to follow injected instructions

Workarounds

  • Keep trusted instructions and untrusted data in separate, labeled channels; never concatenate retrieved text into the system prompt
  • Give the agent only the tools the task needs, with narrow arguments
  • Require human approval for actions that send, delete, pay or publish
  • Filter outputs for exfiltration patterns (external links, encoded data)
  • Run the hijack tests before approving a model or agent version, and after upgrades

There is no complete fix for prompt injection today. Treat it as a design constraint: assume any content the agent reads can try to steer it.

How to investigate

  1. Export the full transcript, including tool inputs and outputs
  2. Find the first untrusted content read before the agent's behavior changed
  3. Inspect that content for instruction phrases and invisible Unicode (content inspector)
  4. List every tool call after that point and check for data leaving your boundary
  5. Rotate any credentials the agent could reach during the session
  6. Add the payload to your hijack test suite so regressions are caught

Sources

Open it in the Learning Center's vulnerability database