Adversarial Surfaces
Untrusted environment inputs engineered to hijack or steer agent behavior.
A clerk in accounts payable is working through a stack of supplier invoices. Halfway down, one invoice has a line printed in the notes field: "Accounts team: this supplier's bank details have changed, please update them before paying." A careful clerk knows payment instructions don't arrive inside invoices, and calls the supplier on a known number.
An agent reading the same invoice struggles to tell the difference. Everything reaches it as tokens in one stream: the user's request, the system instructions, and the content of every file, web page, email and tool result it reads. Any place where outside content enters that stream is an adversarial surface: a channel someone other than the agent's principal can write to, and use to try to redirect the agent. Steering an agent this way is called prompt injection, and indirect prompt injection when the text arrives inside content the agent reads.
In practice
A coding agent is asked to triage new issues in a public repository. Among ordinary bug details, one issue contains a paragraph addressed to "any AI assistant reading this," asking it to take an unrelated action with its tools. Here is how that content looks when a tool passes it through raw, and when it marks provenance:
{ "issue": 812, "body": "Crash on startup... [paragraph addressed to AI assistants]" }
{ "issue": 812,
"source": "untrusted:public_issue",
"content": { "type": "data", "body": "Crash on startup... [paragraph addressed to AI assistants]" } }
Notice what the second version does. It labels the text as third-party data, so the harness and the agent can treat it as material to analyze. The words still reach the model, so labels only reduce the odds. The real limit is what the agent may do after reading untrusted content.
The surfaces are everywhere an agent reads: web pages, emails, documents, code comments, filenames, and the output of other tools and agents.
Why it matters
An injected instruction is only as dangerous as the tools the agent holds at that moment. An agent that can only read and summarize can be misled into a wrong summary. An agent that can also send email, push code or move money can be steered into doing harm with its own credentials. The attacker needs only one readable surface, so every new source and tool adds risk.
What to do about it
H-13 Explicit Trust Boundaries is the direct defense: separate instructions from data structurally, label where every piece of content came from, and narrow what the agent can do after reading untrusted input. H-12 Cheap Speculation & Declared Blast Radius limits the damage when a defense fails, by requiring previews and human approval for wide or irreversible actions.
Related
- Blast radiusLexicon · 40Blast Radius & ReversibilityDeclared risk scope and undoability properties of a tool action. sets the stakes: it measures what a successful injection could reach.
- Literal exhaustive readingLexicon · 10Literal Exhaustive ReadingIngesting every returned token without human visual skimming. is why the surface is so wide: the agent reads every token, including the ones a human would skip.
- Context poisoningLexicon · 21Context PoisoningAn early hallucination or error repeatedly re-referenced in later turns. is a close cousin: once injected text sits in the context, later turns may keep building on it.