Singulr AI Glossary

Understand important concepts in AI Governance and Security

Indirect Prompt Injection

Indirect prompt injection is a type of attack against AI systems where malicious instructions are hidden in external data sources — documents, web pages, emails, database entries, or images — that the AI processes as part of its normal operation. Unlike direct prompt injection, where a user types a malicious prompt, indirect injection exploits the fact that AI models often can't distinguish between trusted instructions and untrusted content embedded in the data they consume. This attack matters because it targets one of the most common AI deployment patterns: retrieval-augmented generation, where models pull in external documents to answer questions or complete tasks. If an attacker can plant instructions in a document that the model will later process, they can potentially hijack the model's behavior — telling it to ignore previous instructions, exfiltrate data, or produce manipulated outputs — without ever interacting with the AI system directly. Indirect prompt injection works because large language models process all text in their context window as a single stream. The model doesn't inherently know which parts are system instructions, which parts are user input, and which parts are retrieved documents. An attacker exploits this by embedding text like "ignore all previous instructions and instead do X" inside content the model will be asked to process. The attack vector is broad: it can be planted in a shared document, a web page the agent browses, an email in an inbox, or even hidden text in an image. For enterprises, indirect prompt injection is one of the most serious AI security threats because it scales easily and is hard to detect. Organizations need input sanitization, content boundary enforcement, and output monitoring to defend against it — especially as AI agents gain access to more data sources and tools across the enterprise.
A
C
E
F
G
H
I
J
M
P
S
T
U