Indirect prompt injection
Indirect prompt injection is prompt injection delivered through content an AI system reads, such as a web page, email, document or tool result, rather than typed by the user.
Greshake et al. showed attackers can plant instructions in data that LLM-integrated apps retrieve, leading to data theft, misinformation or unwanted actions without the user noticing.
Agents are especially exposed because they read untrusted content and can act on it. Treat every retrieved or tool-returned text as data, never as instructions, and limit what an agent can do without confirmation.
Learn more on Kojen
Related terms
- Prompt injectionPrompt injection is an attack in which text supplied to a language model overrides or subverts its intended instructions, for example "ignore previous instructions and…"..
- Red teamingRed teaming is deliberately attacking an AI system, by hand or with automated attackers, to find harmful, insecure or failing behaviour before real users do..
- Context engineeringContext engineering is designing everything that goes into a model's context window, instructions, tools, retrieved documents, memory and history, so an agent has the information it needs and little else..
Sources
Put the definitions to work.
Kojen evaluates, tunes and red-teams your agents with these methods built in: Wilson intervals, pass^k, LLM judges with visible components. Free to start.
Start training free