Home › Glossary

What is prompt injection (in plain English)?

Plain-English definition · Updated 2026-11-11. Every claim below is attributed to the organisation that published it — OWASP's LLM Top 10, Google DeepMind's CaMeL paper, Meta's AI security guidance, and Simon Willison, who coined the term in September 2022. Prompt-injection defences change quarterly; the structural test in this entry has not changed since 2025.

AITop is an independent guide. Prices and features change fast — always check the vendor's page.

The 30-second answer

Prompt injection is a vulnerability in which instructions hidden in content an AI system reads — an email, a web page, a PDF, a calendar invite, another tool's output — get executed as if you had typed them. It is not a bug you patch, because the model receives your instructions and the attacker's text as one undifferentiated run of tokens; as Simon Willison put it when he named the term on 12 September 2022, "everything eventually gets glued together into a sequence of tokens." The buying test has three questions: does the tool read content you didn't write, does it hold data you care about, and can it send something out or change something? Two out of three is the 2026 ceiling — that is Meta's Agents Rule of Two (published 31 October 2025), a formalisation of Willison's lethal trifecta (16 June 2025). The strongest published defence, Google DeepMind's CaMeL, solves 77% of tasks on the AgentDojo benchmark with provable security against 84% for an undefended system — an 8% relative loss of capability in exchange for a security guarantee that does not depend on the model noticing the attack.

What does prompt injection actually mean?

Prompt injection is the AI-era version of SQL injection, and the analogy is exact rather than decorative: in both cases a system concatenates trusted instructions with untrusted data, and in both cases the boundary between the two is only as strong as the parser. OWASP's LLM01:2025 entry — the top-ranked risk in the OWASP Top 10 for LLM Applications — defines it as follows: "A Prompt Injection Vulnerability occurs when user prompts alter the LLM's behavior or output in unintended ways. These inputs can affect the model even if they are imperceptible to humans, therefore prompt injections do not need to be human-visible/readable, as long as the content is parsed by the model."

OWASP splits it in two. Direct prompt injection is a user's own input changing the model's behaviour — sometimes malicious, sometimes accidental. Indirect prompt injection is the dangerous one for buyers: the model accepts input from an external source such as a website or a file, and content inside that source alters the model's behaviour when the model interprets it. The victim is the person who asked for the summary, not the person who wrote the page.

Two naming disputes are worth settling because they change what you buy. First, jailbreaking versus injection: OWASP treats jailbreaking as "a form of prompt injection where the attacker provides inputs that cause the model to disregard its safety protocols entirely." Willison, who coined both the term and the distinction, argues they are different problems — jailbreaking is about what a model will say, injection is about what an agent will do with your credentials. For a buyer picking tools, the operational definition is Willison's: if the attack arrives inside content, it is injection, and content filters tuned for offensive output will not catch it. Second, "prompt": the attack is not necessarily a prompt in the chat sense. It is text — or pixels, or a tool response — that the model parses.

Why does it matter when you're choosing a tool?

Because the entire 2026 category of AI products — agents, browser assistants, inbox copilots, coding agents — is a bet that models can safely act on content nobody vetted. The same three capabilities that make an assistant useful are the three that make it exploitable, and Willison's lethal trifecta names them: "access to your private data," "exposure to untrusted content," and "the ability to externally communicate in a way that could be used to steal your data." His conclusion is blunt: "If your agent combines these three features, an attacker can easily trick it into accessing your private data and sending it to that attacker."

This is no longer theoretical. CVE-2025-32711 ("EchoLeak"), reported against Microsoft 365 Copilot by Aim Labs and fixed in mid-2025, was a zero-click indirect injection: a crafted email carried instructions that made Copilot retrieve private content and smuggle it out through a Markdown image reference pointing at an allowed domain's open redirect — no user click, no malware, no attachment. Willison's running catalogue of the same pattern spans ChatGPT, Google Bard, Amazon Q, NotebookLM, GitHub Copilot Chat, Slack, Mistral Le Chat, Grok, the Claude iOS app and ChatGPT Operator, from 2023 through 2025.

The commercial consequence is a question you can ask a vendor in a sales call: which leg of the trifecta does your product remove? A chatbot that reads your files but cannot send anything has removed the exfiltration leg. A coding agent that can open pull requests but only reads public repos has removed the private-data leg. A tool with access to everything and an outbound channel has removed nothing and is asking you to trust a classifier. Vendors increasingly answer this in public: Meta's guidance says that when an agent needs all three properties "the agent should not be permitted to operate autonomously and at a minimum requires supervision — via human-in-the-loop approval or another reliable means of validation."

What actually works as a defence?

Does a guardrail model fix it?

No, and the honest sources say so. OWASP: "Given the stochastic influence at the heart of the way models work, it is unclear if there are fool-proof methods of prevention for prompt injection." EchoLeak is the demonstration — Microsoft had classifiers for what it calls XPIA (cross/indirect prompt injection), and the researchers bypassed them simply by phrasing the malicious email as instructions to its human recipient, never mentioning AI, assistants or Copilot. Filter vendors who quote a detection rate are quoting a false-negative rate too: Willison's verdict on "95% of attacks" claims is that "in web application security 95% is very much a failing grade."

What is the Rule of Two, and why can you put it in a contract?

Meta's Agents Rule of Two (31 October 2025) converts the trifecta into a countable constraint: within a single session, an agent may satisfy no more than two of [A] processing untrustworthy inputs, [B] access to sensitive systems or private data, [C] the ability to change state or communicate externally. Meta credits both Chromium's Rule of Two and Willison's trifecta, and states the framework was built so that "the severity of security risks is deterministically reduced." The reason this matters commercially is that it is a design-review question with a binary answer, citable in a procurement conversation, rather than a vague promise of "defence in depth." Note what [C] covers: not just sending data out but changing state — merging a pull request, issuing a refund, deleting a record. An agent that reads attacker text and can write to your ticketing system is dangerous even if it never transmits a byte.

What does a defended architecture look like?

The published designs all move the trust decision out of the model and into code around it. The June 2025 "Design Patterns for Securing LLM Agents against Prompt Injections" paper states the principle in one sentence: "once an LLM agent has ingested untrusted input, it must be constrained so that it is impossible for that input to trigger any consequential actions" — and offers six patterns, of which the most cited are plan-then-execute (the plan is fixed before untrusted data arrives) and the dual-LLM split (a privileged model plans and calls tools but never reads untrusted text; a quarantined model reads untrusted text but has no tools). Google DeepMind's CaMeL (arXiv 2503.18813, March 2025) hardens the dual-LLM idea with capabilities and information-flow control enforced by a deterministic interpreter, and reports 77% of AgentDojo tasks solved "with provable security" versus 84% for an undefended system — roughly a 7-point, or 8% relative, capability cost. The paper is candid about the ceiling: the quarantined model can still be lied to, so extracted values remain untrustworthy even when control flow is safe.

The 2026 reality check

The attack moved from chat to credentials. Through 2023 injection meant a bot producing embarrassing text. In 2026 it means an agent holding your OAuth tokens, your repository scope or your inbox. That shift is why OWASP created a separate Top 10 for agentic applications, where goal hijacking via prompt injection sits at the top of the list, and why the mitigation list leads with privilege control: "Provide the application with its own API tokens … and handle these functions in code rather than providing them to the model."

MCP made the surface combinatorial. A tool catalog wired to one vendor is a closed set; a protocol that lets users mix servers from many sources is an open one. Willison's warning is structural rather than partisan: the problem with MCP "is that it encourages users to mix and match tools from different sources that can do different things" — some holding private data, some fetching untrusted content, some able to make an outbound request. Each combination has to be evaluated as a combination, which is exactly what the Rule of Two is for.

Zero-click is the new normal. EchoLeak needed nothing from the user beyond receiving an email, and the exfiltration hid in a rendering path (an allow-listed domain's open redirect) rather than in a tool call. The lesson generalises: the outbound leg is often something you did not think of as a network call — an image URL, a link preview, a shared document, a log line. Audit egress by what the product renders, not only by what it posts.

"Internal" is not a trust label. Every published incidence chain in 2025 and 2026 starts with content that looked routine: a support ticket, a public issue, a spam email, a shared doc. If your agent reads it, treat it as attacker-controlled, and treat summaries of it as data rather than instructions.

Quick checklist

Where you'll hit it

Prompt injection is the hidden column in three purchases on this site. In the best AI chatbots ranking it is why consumer chat products sandbox their browsing and file tools — the assistant that can read a PDF you uploaded can also read a PDF someone sent you. In the ChatGPT vs Claude vs Gemini comparison it is the reason the three vendors draw their tool permissions differently, and why "connectors" and "agent mode" are not equivalent features across products. In the best AI coding assistants ranking it is the difference between an agent that opens a pull request for review and one that merges it. Related terms: function calling is the mechanism an injection abuses to reach your tools, AI agent is the product category the trifecta describes, AI crawler blocking covers the inbound half of the same trust problem, and structured outputs explains why a schema guarantee makes injection narrower but not safe. Full list on the AI tools glossary.

The bottom line

Prompt injection is the vulnerability class in which instructions inside content an AI reads get followed as commands — ranked LLM01 by OWASP for 2025, named by Simon Willison in September 2022, and still unsolved at the model layer, with OWASP itself saying fool-proof prevention is unclear. The defences that hold are architectural and countable: Meta's Agents Rule of Two caps a session at two of {untrusted input, private data, external or state-changing action}, and CaMeL-style capability enforcement buys provable security on 77% of AgentDojo tasks against 84% undefended. For a buyer the practical test is three yes/no questions per tool, plus one more: which leg did the vendor remove on purpose?