Indirect prompt injection
Prompt injection that arrives in content an AI system reads on its own, such as a web page, email, document or tool result, instead of what the user types.
Indirect prompt injection is the form of prompt injection where the attacker never talks to the model. They plant instructions in content the system will read later: a web page the assistant summarizes, an email in an inbox, a shared document, a RAG index or a tool result. Greshake and co-authors described it in February 2023 in “Not what you’ve signed up for”, with working attacks on Bing’s GPT-4 chat and on code-completion tools.
It is the main reason agents are risky: the more an agent reads, the more people can give it orders. The user may never see the hostile text, because it can sit in white-on-white text, HTML comments or file metadata. OWASP covers it under LLM01, and in agents it leads to goal hijacking and data exfiltration. Filters lower the success rate, while design limits the damage, as the lethal trifecta shows.
Sources
- arXiv: Greshake et al., Not what you’ve signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection (2023) arxiv.org
- OWASP GenAI: LLM01:2025 Prompt Injection genai.owasp.org
Related terms
- Prompt injection: Instructions hidden in data (a web page, an email, a file) that the model follows as if they came from you.
- Lethal trifecta: An AI agent that has private data, reads untrusted content and can send data out can be tricked into leaking that data.
- AI agent data exfiltration: An attack in which injected instructions make an AI assistant or agent send private data to an outsider, through a tool call, a link or an image URL.
- Agent goal hijacking: An attack that changes what an AI agent is trying to achieve, usually through injected content, so it works for the attacker while seeming to work for you.
- RAG (retrieval-augmented generation): Finding relevant documents first and putting them into the prompt, so the model answers from them.
- Tool poisoning (MCP): An attack that hides instructions in a tool’s name, description or output, so an agent using that tool follows the attacker instead of the user.
