Prompt injection
Prompt injection is an attack in which a piece of text makes a language model, or an AI assistant or agent built on one, behave in a way its designers did not intend: ignoring its rules, revealing information or carrying out an action. OWASP ranks it first in its list of risks for applications built on language models (LLM01 in the current 2026 edition).
Direct and indirect
- Direct: the user writes instructions to the assistant to get around its rules.
- Indirect: the instructions arrive hidden in content the assistant reads from outside, such as an email, a document, a web page or a review. This is the one that matters most in a company, because the attacker needs no access to the assistant: it is enough that the assistant reads their text.
Why it cannot be fixed like other injections
The UK’s National Cyber Security Centre (NCSC) explained it in December 2025: SQL injection is prevented by separating instructions from data, but current language models do not enforce that separation in what they read. It therefore recommends treating them as an intermediary that is inherently open to confusion. OWASP agrees that it is unclear whether any fool-proof prevention exists.
Why it matters to leadership
Because the main defence lies not in the model but in what you let it do. An assistant that reads email from strangers, can see customer data and can send messages on its own is risky even if the model is excellent. Limiting its tools and permissions (least privilege) and requiring a person to confirm sensitive actions reduces the damage when the model gets confused.
Testing it, with test markers and no real data, is what the AI agent security review does.
What to ask for and how to check it
- What to require: before an assistant or agent goes live, a list of what it reads (email, documents, the web, tickets) and what it can do (send, pay, delete, change data), and that every action with impact asks a person to confirm.
- Evidence that counts: a test in a staging environment in which it is fed a text with hidden instructions, with a pass criterion written in advance: it takes no action nobody asked for and reveals no data outside its scope.
- Warning sign: a supplier who answers that the model “already has filters” or that its instructions forbid it. Neither OWASP nor the NCSC considers that enough; what limits the damage is permissions and confirmations.
Source
OWASP GenAI Security Project, Top 10 for LLM Applications 2026 (LLM01), and NCSC, Prompt injection is not SQL injection (it may be worse) (8 December 2025). Accessed 2 December 2026.