What is prompt injection?
Short answer
Prompt injection is an attack where text supplied to an AI model, directly by a user or hidden in a web page, email or document the model reads, overrides the instructions the developer intended. It is listed first in the OWASP Top 10 for LLM Applications.
The details
Direct injection comes from the person typing; indirect injection hides instructions in content the model processes, such as a web page an AI assistant summarizes. The risk grows when the model can take actions, like sending email or calling tools, because injected instructions can trigger those actions.
There is no complete fix today. Reduce impact by limiting what the model can access and do, treating model output as untrusted, requiring human approval for sensitive actions, and separating trusted instructions from untrusted content.
Useful next reads and tools
- AI Security guides · guide
Terms explained
- Prompt injection
- Prompt injection is an attack on AI applications in which crafted input, typed directly or hidden in content the model reads, overrides the developer’s instructions.
- OWASP Top 10
- The OWASP Top 10 is an awareness list of the most critical security risks to web applications, published by the Open Worldwide Application Security Project.