THE ESSENTIALS IN 30 SECONDS
- Prompt injection is listed as LLM01 in the OWASP Top 10 for LLM applications.
- Indirect injection hides instructions in content the model reads, such as web pages or files.
- Mitigations include least privilege, human approval for risky actions and treating external content as untrusted.
A prompt injection happens when text supplied to a language model changes its behavior in ways its developers did not intend. The OWASP GenAI Security Project ranks it first in its Top 10 risks for LLM applications.
Direct and indirect
In a direct injection, the user types the malicious instruction. In an indirect injection, the instruction is hidden in content the model processes on someone's behalf — a web page, an email or a document.
Why agents raise the stakes
When a model can only answer questions, a successful injection produces a bad answer. When it can send emails, run code or call APIs, the same injection can trigger real actions.
What OWASP recommends
Limit the model's privileges to what the task needs, require human approval for high-impact actions, separate and label external content, and test applications adversarially.
