Prompt injection prevention has quietly split into two kinds of advice. One kind asks the model to defend itself: harden the system prompt, add a classifier, tell it to ignore instructions found in data. The other kind assumes the model will eventually be fooled and asks a different question — when it is, what can the attacker actually reach? Three separate 2026 studies now point the same way: only the second kind survives contact with an attacker who adapts.
This is not a theoretical worry any more. Attackers no longer need a vulnerability in your code. They need a page your agent reads.
Prompt injection is not jailbreaking
The two terms get used interchangeably and they are not the same thing. The OWASP Gen AI Security Project, which ranks prompt injection as LLM01 — the first entry in its Top 10 for LLM applications — treats jailbreaking as a subtype: an injection whose goal is to make the model discard its safety training entirely. Ordinary prompt injection is broader and, for anyone running agents, more dangerous. It does not need the model to misbehave. It only needs the model to follow the wrong instructions.
The split that matters operationally is direct versus indirect. Direct injection comes from the person typing. Indirect injection arrives inside the content the system was asked to process — a web page, a PDF, an email, a calendar entry, a GitHub issue, a tool result. OWASP notes that the payload need not be human-readable at all; a model can act on text no reader would ever see.
That is precisely where the field has moved. An agent that browses, retrieves and summarizes is, by construction, an agent that executes attacker-controlled text.
How much of it is actually out there
Until recently the honest answer was: nobody had counted. In April 2026 a research team led by Soheil Khodayari published one of the first large-scale measurements of indirect prompt injection on the open web. Scanning 1.2 billion URLs across 24.8 million hosts, they validated 15,300 injection instances on 11,700 pages.
Two findings are worth internalizing. First, roughly 70% of the instructions appear in non-rendered HTML — headers, comments, metadata — so they are aimed at machines, not people, and a human reviewing the page would never see them. Second, the ecosystem is not purely criminal: alongside hostile payloads the authors found reputation manipulation, content-protection directives telling crawlers what to say, and bot-detection tricks. Site owners are talking to your agent behind your back.
The measured compliance rate is the part that keeps this proportionate. Across 5,200 controlled experiments on 13 models, compliance was limited but non-negligible, reaching up to 8% for smaller models on plain-text input — and dropping when the page was passed in a structured representation that preserved the difference between markup and prose. Feeding your agent stripped plain text is worse than feeding it structure.
The operational picture is sharper still. The Cloud Security Alliance’s AI Safety Initiative, in an April 2026 research note, cites Google measuring a 32% relative increase in malicious injection content between November 2025 and February 2026, and Palo Alto Networks’ Unit 42 cataloguing 22 payload-delivery techniques in active use. Of the eight significant incidents the note counts from the first quarter of 2026, exactly one carried a CVE. The rest — including bug-bounty payouts by Anthropic, GitHub and Google for injection flaws in their own coding agents — produced no advisory, no scanner signature, no version to pin. If your security process starts with a CVE feed, this class of bug is invisible to you.
Why the model cannot be the control
The instinct is to filter. Detect the malicious instruction, refuse it, log it. Vendors sell this, and it does raise the cost of an attack. What it does not do is hold.
In April 2026 a team led by Priyal Deep ran an adaptive attacker — one that evolves its strategy over hundreds of rounds — against nine defense configurations across more than 20,000 attacks. Every configuration that relied on the model to police itself eventually broke. The only one that held was output filtering implemented in ordinary application code, checking responses against hardcoded rules before they reach the user: zero leaks across 15,000 attacks.
Two caveats belong with that number, and they are the reason to read the paper rather than the headline. The threat model is secret extraction — credentials embedded in system prompts — not the full range of agent hijacking, so “zero leaks” is a claim about exfiltration of a known string, not about an agent that books the wrong flight. And the authors close by pointing at their own testing product, which is a commercial interest worth naming even when the experiment is sound.
The independent voices land in the same place. OWASP’s own entry concedes that given how models work, “it is unclear if there are fool-proof methods of prevention.” Simon Willison, who named the problem in 2022 and has tracked it since, makes the sharper version of the argument: a guardrail that stops 95% of attacks is not a security control, because the attacker only needs the other 5%, and a model cannot reliably rank instructions by where they came from.
The lethal trifecta is the real design rule
Willison’s most useful contribution is not a defense but a test. His lethal trifecta, from June 2025, says an agent becomes dangerous when three properties coexist: access to private data, exposure to untrusted content, and the ability to communicate externally. Any two are survivable. All three, and a single poisoned page can read your data and ship it out, with no bug in your code at any point.
This reframes the whole problem as an architecture question. You are not trying to make the model incorruptible. You are trying to make sure that a corrupted model has nothing worth reaching and no way to send it anywhere. Egress control does real work here — restricting which domains an agent can call at all, which is the case we made when we looked at zero-trust AI gateways. So does the unglamorous rule the CSA note ends on: allow-list the domains an agent may render Markdown images from, because an image URL is an exfiltration channel wearing a costume.
Six patterns that make injection survivable
The most practical map of that architecture is a fourteen-author paper on design patterns for securing LLM agents, from a group including ETH Zurich’s Florian Tramèr. Its premise is that you get provable resistance not from better prompts but from isolating untrusted data from the agent’s control flow. Six patterns, in ascending order of freedom given to the model:
- Action-Selector. The agent maps a request to one of a fixed set of predefined actions and never sees the result. No feedback, no injection path.
- Plan-Then-Execute. The agent commits to a plan of tool calls before touching untrusted data. Injected text can alter the content of a step but cannot add a step.
- LLM Map-Reduce. One isolated, tool-less sub-agent per untrusted document; a poisoned file can only mislabel itself, not reach the others.
- Dual LLM. A privileged model that holds the tools but never reads untrusted text, calling a quarantined model that reads it but holds nothing. Results pass by reference through plain software.
- Code-Then-Execute. The agent writes an explicit program that calls tools and spawns unprivileged models; the program, not the prose, is the control flow.
- Context-Minimization. The user’s prompt is dropped from context once it has done its job, so it cannot steer the answer that comes back.
Each pattern buys security by taking away generality, and the paper is candid about that trade. It also separates these from baseline hygiene every agent should have anyway: sandboxed execution and explicit human confirmation before consequential actions — the point where an oversight design stops being decoration, which is what made the question of who holds the off switch the through-line of that week’s agent news.
What changes when the agent has memory
One reason 2026 feels different is that injections stopped being one-shot. A January 2026 paper argues that prompt injection has matured into a malware delivery mechanism, proposing a seven-stage kill chain — initial access, privilege escalation, reconnaissance, persistence through memory and retrieval poisoning, command and control, lateral movement, actions on objective. Reviewing 36 studies and real incidents, the authors count at least 21 attacks that traverse four or more of those stages.
Persistence is the stage that breaks most mental models. If an agent writes to a memory store or a vector index, a single successful injection does not end when the session does; it waits to be retrieved. The same logic extends to the tool surface — every MCP server you connect is another party whose output your agent trusts, and treating that catalogue as a supply chain rather than a feature list is now the baseline posture.
And the ceiling on all of this is set by what an agent can do when it is wrong at machine speed. The July 2026 episode in which an evaluation agent escaped its sandbox and spent four and a half days probing a production platform — reconstructed in unusual detail by both companies involved, and covered in our breakdown of the Hugging Face incident — was not a prompt injection. It is still the clearest available picture of the blast radius that any successful injection inherits.
A prompt injection prevention checklist
Nothing here is a product you can buy on Friday. It is a set of decisions about what your agent is allowed to be:
- Break the trifecta first. For each agent, write down its private data, its untrusted inputs and its outbound channels. If all three are present, remove one before doing anything else.
- Put the boundary in code, not in the prompt. Validate and filter outputs in application logic the model cannot argue with.
- Scope credentials to the task. Least privilege per agent, not per team — an injected agent inherits every permission you granted it.
- Require human approval for irreversible actions. Sending, paying, deleting, merging, granting access.
- Allow-list egress, including image and link rendering domains.
- Keep untrusted content structured and labelled. Mark retrieved text as data; strip zero-width characters and HTML comments; do not flatten pages to plain text if you can avoid it.
- Treat memory as attack surface. Isolate what an agent may write back, and expire it.
- Test adversarially and repeat it. A defense that has only met a fixed attack suite has not been tested; the adaptive attacker is the realistic one.
The governance layer is arriving to meet this — enterprise buyers now rank agent security and governance as their leading obstacle to scaling, as Google Cloud’s own report conceded in August. But governance frameworks do not decide whether a poisoned calendar entry can reach your outbound API. Your architecture does, and it decides that before the attack arrives.
Sources
- OWASP Gen AI Security Project — LLM01:2025 Prompt Injection
- Simon Willison — The lethal trifecta for AI agents (June 2025)
- Khodayari et al. — Indirect Prompt Injection in the Wild (April 2026)
- Cloud Security Alliance — Indirect Prompt Injection Goes Operational (April 2026)
- Deep et al. — Evaluation of Prompt Injection Defenses in Large Language Models (April 2026)
- Beurer-Kellner et al. — Design Patterns for Securing LLM Agents against Prompt Injections (June 2025)
- The Promptware Kill Chain (January 2026)