Where the term comes from
On 12 September 2022, the developer Simon Willison wrote about a post by Riley Goodside, who had shown GPT-3 prompts “with malicious inputs that order the model to ignore its previous directions.” Willison drew the conclusion: “This isn’t just an interesting academic trick: it’s a form of security exploit. I propose that the obvious name for this should be prompt injection.”
He compared it with a well-known attack on databases: “The obvious parallel here is SQL injection.” In SQL injection, an attacker hides database commands in an input field. In prompt injection, the hidden part is an instruction inside text that a language model reads. The UK's National Cyber Security Centre (NCSC) dates the term the same way: “The term ‘prompt injection’ was coined in 2022 to describe a new class of application vulnerability in genAI applications.” In December 2025 it published a post with the title “Prompt injection is not SQL injection (it may be worse)”.
Direct and indirect prompt injection
Standards bodies distinguish two routes. In a direct injection, the person using the system types the instructions. NIST's taxonomy of attacks on AI systems (AI 100-2 E2025, March 2025) describes attacks “in which the main user provides in-context instructions that are appended to higher-trust instructions like those provided by the application designer”. In an indirect injection, the instructions come from someone else and reach the model through content it processes. OWASP: “Indirect prompt injections occur when an LLM accepts input from external sources, such as websites or files.”
| Type | Who writes it | Where it sits |
|---|---|---|
| Direct | The user of the system | In the prompt the user types |
| Indirect | A third party | In a website, email, document or other content the model reads |
Sources: NIST AI 100-2 E2025 (March 2025); OWASP LLM01:2025; Google, 13 June 2025.
Kai Greshake and five co-authors described the indirect route in February 2023. They argued “that LLM-Integrated Applications blur the line between data and instructions”, showed that attackers can work “by strategically injecting prompts into data likely to be retrieved”, and tested this “against both real-world systems, such as Bing's GPT-4 powered Chat and code-completion engines, and synthetic applications built on GPT-4.” Google's security team names “emails, documents, or calendar invites” as carriers (13 June 2025).
OpenAI describes the setting in which this matters for assistants: “In AI products today, your conversation may include content from many sources, including the internet.” An AI browser reads the pages its user opens, and an AI agent processes what its tools return.
Two routes to the model
Directthe user writes the instructions
User
Prompt
Instructions
Model
Indirecta third party writes them
User
Request
a normal question
Model
Content
websiteemaildocument
Instructions
Third party
Prompt injection and jailbreaking
The two terms are used in two ways, and the sources disagree. OWASP counts jailbreaking as a subtype: “Jailbreaking is a form of prompt injection where the attacker provides inputs that cause the model to disregard its safety protocols entirely.”
Willison separates them (5 March 2024). Prompt injection “is a class of attacks against applications built on top of Large Language Models (LLMs) that work by concatenating untrusted user input with a trusted prompt constructed by the application’s developer”, while jailbreaking “is the class of attacks that attempt to subvert safety filters built into the LLMs themselves.” Google's threat intelligence team uses the jailbreak as the counterpart of the indirect route: there, a user “jailbreaks” a chatbot directly, whereas an indirect injection happens when “an AI system processes content—like a website, email, or document—that contains malicious instructions.”
Why language models are exposed
A language model receives its instructions and the material it works on as one stream of text. The NCSC puts it this way: “Current large language models (LLMs) simply do not enforce a security boundary between instructions and data inside a prompt.” NIST describes the same mechanism: “Because GenAI models combine the data and instruction channels, attackers can leverage the data channel to affect system operations by manipulating resources with which the system interacts.” Microsoft's Security Response Center (29 July 2025): “Fundamentally, the risk is that an attacker could provide specially crafted data that the LLM misinterprets as instructions.”
NIST names the systems this applies to, from an internet-connected agent to a retrieval-augmented generation (RAG) system, which adds retrieved documents to what a large language model reads. The injected text does not have to be visible to a person. OWASP: “prompt injections do not need to be human-visible/readable, as long as the content is parsed by the model.”
How much harm follows depends on the system. According to OWASP, the impact is “largely dependent on both the business context the model operates in, and the agency with which the model is architected.” Willison: “How bad the attack can be depends entirely on what those applications can do.”
What providers and standards bodies say
Four sources state how far the problem is from being fixed:
| Source | Statement | Date |
|---|---|---|
| OpenAI | “a hard, open problem” | 7 Nov 2025 |
| Anthropic | “far from a solved problem” | 24 Nov 2025 |
| OWASP | “it is unclear if there are fool-proof methods of prevention” | LLM01:2025 |
| UK NCSC | “will remain a residual risk” | 8 Dec 2025 |
All pages retrieved 4 December 2026. Anthropic's page was last modified on 9 October 2026.
Anthropic reports a figure for its own model in the same article, a 1% attack success rate for Claude Opus 4.5 in browser use, and adds: “A 1% attack success rate—while a significant improvement—still represents meaningful risk.”
The defences the sources describe come in layers, not as a single fix. Google titled its June 2025 post “Mitigating prompt injection attacks with a layered defense strategy”, and Microsoft describes a multi-layered defence. OWASP's list includes restricting the application's privileges to what it needs and requiring human approval for high-risk actions. OpenAI wrote in March 2026 that “the most effective real-world versions of these attacks increasingly resemble social engineering more than simple prompt overrides.”
Prompt injection on websites
Two studies from 2026 looked for injected instructions on public web pages. Google's threat intelligence team scanned the Common Crawl archive and published its results on 23 April 2026. It sorted what it found into harmless pranks, helpful guidance, search engine optimization (SEO), deterring AI agents, and malicious instructions aimed at data exfiltration or destruction. On SEO it writes: “Some websites include prompt injections for the purpose of SEO, trying to manipulate AI assistants into promoting their business over others”.
Google's overall assessment: “We mostly found individual website authors who seemed to be running experiments or pranks, without replicating advanced IPI strategies found in recently published research.” Between November 2025 and February 2026 it measured “a relative increase of 32% in the malicious category”.
Soheil Khodayari and three co-authors went further (arXiv, first version 29 April 2026, revised 4 November 2026): “Analyzing 1.2B URLs from 24.8M hosts, we identify 15.3K validated instances across 11.7K pages.” Their key finding is that “most instructions target machines rather than humans: about 70% appear in non-rendered HTML (e.g., headers, comments, metadata)”. The authors count “reputation manipulation” among the objectives, next to disruptive prompts, content-protection directives and AI-bot detection.
Tools that a page offers to agents are another route. The WebMCP specification warns of cases where “malicious instructions are embedded in tool metadata, inputs, or outputs to manipulate agent behavior or compromise systems.”
Documented cases
- 2022: Goodside's GPT-3 examples, which gave the attack its name (Willison, 12 September 2022).
- 2023: Greshake et al. demonstrate indirect injection against Bing's GPT-4 chat and code-completion engines (arXiv, February 2023).
- 2024: Donghyun Lee and Mo Tiwari describe “Prompt Infection”, “a novel attack where malicious prompts self-replicate across interconnected agents, behaving much like a computer virus” (arXiv, 9 October 2024).
- 2025: Google DeepMind reports on defending Gemini against indirect injection, where adversaries “can embed malicious instructions in untrusted data which cause the model to deviate from the user's expectations and mishandle their data or permissions” (arXiv, 20 May 2025).
- 2026: the web studies by Google and by Khodayari et al. described above.
Patterns the sources describe
This entry names the forms without reproducing any attack text:
- Overriding the task: the input tells the model to drop its original instructions, as in Goodside's examples.
- Leaking the prompt: the input asks the model to reveal its own instructions. Willison's 2022 post calls this a prompt leak.
- Instructions in messages and files: an email, document or calendar invite that an assistant processes (Google, June 2025).
- Instructions in web pages: mostly in parts of the HTML a visitor does not see (Khodayari et al., 2026).
- Instructions in images: OWASP describes “hiding instructions in images that accompany benign text”.
- Instructions that spread: passed from one agent to the next (Prompt Infection, 2024).
Source
- Simon Willison, “Prompt injection attacks against GPT-3” (12 September 2022). Source for the origin of the term, Goodside's examples, the SQL injection comparison and prompt leaks (retrieved 2026-12-04): https://simonwillison.net/2022/Sep/12/prompt-injection/
- Simon Willison, “Prompt injection and jailbreaking are not the same thing” (5 March 2024). Source for the distinction from jailbreaking and the severity (retrieved 2026-12-04): https://simonwillison.net/2024/Mar/5/prompt-injection-jailbreaking/
- OWASP GenAI Security Project, “LLM01:2025 Prompt Injection”. Source for indirect injection, jailbreaking, invisible and multimodal injection, impact, prevention and mitigations (retrieved 2026-12-04): https://genai.owasp.org/llmrisk/llm01-prompt-injection/
- NIST AI 100-2 E2025, “Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations” (March 2025, PDF). Source for direct and indirect injection, data and instruction channels (retrieved 2026-12-04): https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-2e2025.pdf
- UK NCSC, “Prompt injection is not SQL injection (it may be worse)” (8 December 2025). Source for the date of the term, the missing security boundary and residual risk (retrieved 2026-12-04): https://www.ncsc.gov.uk/blog-post/prompt-injection-is-not-sql-injection
- Greshake et al., “Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection” (arXiv 2302.12173, 23 February 2023). Source for indirect injection and the Bing test (retrieved 2026-12-04): https://arxiv.org/abs/2302.12173
- OpenAI, “Understanding prompt injections: a frontier security challenge” (7 November 2025). Source for content from many sources and the open problem (retrieved 2026-12-04): https://openai.com/index/prompt-injections/
- OpenAI, “Designing AI agents to resist prompt injection” (11 March 2026). Source for the shift towards social engineering (retrieved 2026-12-04): https://openai.com/index/designing-agents-to-resist-prompt-injection/
- Anthropic, “Mitigating the risk of prompt injections in browser use” (24 November 2025, modified 9 October 2026). Source for the unsolved problem and the 1% attack success rate (retrieved 2026-12-04): https://www.anthropic.com/research/prompt-injection-defenses
- Google, “Mitigating prompt injection attacks with a layered defense strategy” (13 June 2025). Source for carriers of indirect injection and layered defence (retrieved 2026-12-04): https://blog.google/security/mitigating-prompt-injection-attacks/
- Google, “AI threats in the wild: The current state of prompt injections on the web” (23 April 2026). Source for the web scan, its categories, the SEO quote and the increase (retrieved 2026-12-04): https://blog.google/security/prompt-injections-web/
- Khodayari, Zhang, Acharya and Pellegrino, “Indirect Prompt Injection in the Wild” (arXiv 2604.27202, v2 4 November 2026). Source for the 15.3K instances and non-rendered HTML (retrieved 2026-12-04): https://arxiv.org/abs/2604.27202
- Microsoft Security Response Center, “How Microsoft defends against indirect prompt injection attacks” (29 July 2025). Source for crafted data misread as instructions and layered defence (retrieved 2026-12-04): https://www.microsoft.com/en-us/msrc/blog/2025/07/how-microsoft-defends-against-indirect-prompt-injection-attacks
- Google DeepMind, “Lessons from Defending Gemini Against Indirect Prompt Injections” (arXiv 2505.14534, 20 May 2025). Source for the Gemini report (retrieved 2026-12-04): https://arxiv.org/abs/2505.14534
- Lee and Tiwari, “Prompt Infection: LLM-to-LLM Prompt Injection within Multi-Agent Systems” (arXiv 2410.07283, 9 October 2024). Source for self-replicating prompts (retrieved 2026-12-04): https://arxiv.org/abs/2410.07283
Frequently asked questions
What is prompt injection?
Prompt injection is an attack in which text makes a language model follow instructions it was not meant to follow. The text is either typed into the prompt (direct injection) or placed in content the model reads, such as a website, email or document (indirect injection). Simon Willison coined the term in September 2022.
Is prompt injection the same as jailbreaking?
It depends on the source. OWASP treats jailbreaking as a form of prompt injection. Simon Willison, who coined the term, treats them as two classes: prompt injection targets applications that combine a developer's trusted prompt with untrusted input, jailbreaking targets the safety filters built into the model itself.
What is indirect prompt injection?
Indirect prompt injection means a third party places instructions in content the model processes, such as a website, email, document or calendar invite, instead of typing them into the prompt. OWASP, NIST and Google use the term; Greshake et al. described the route in February 2023.
How serious is a prompt injection?
That depends on what the system can do. According to OWASP, the impact depends on the business context and on how much agency the system has. Simon Willison writes that an application without access to confidential data and without tools that act in the world limits the risk.
Will prompt injection ever be solved?
The providers and agencies quoted here do not call it solved. OpenAI described it as “a hard, open problem” in November 2025, Anthropic as “far from a solved problem” in November 2025, and the UK NCSC expects it to “remain a residual risk” (December 2025). OWASP considers it unclear whether fool-proof prevention exists.