Definition
Prompt injection is a class of security vulnerability in applications built on large language models. It occurs when content processed by the model contains instructions that cause it to ignore or override the instructions set by the application's developers. Because a language model receives its instructions and the data it works on as text, it cannot always reliably distinguish between the two. It is listed as a leading risk in the OWASP Top 10 for Large Language Model Applications.
Direct prompt injection comes from a user typing into the application. Indirect prompt injection comes from external content the model reads, such as an email, uploaded document or web page. The risk grows with the model's access: an assistant that can read private data or call tools could be manipulated into revealing information or taking unintended actions. There is no single complete fix. Mitigations include treating model output as untrusted, giving the model only the minimum data and tool permissions it needs, enforcing permissions outside the model, requiring human approval for consequential actions, filtering inputs and outputs, and monitoring and testing.
Example
A hypothetical hotel deploys an assistant that summarises incoming guest emails for staff. A message contains hidden text attempting to make the assistant reveal other guests' details. Because the assistant can only read the single email it is summarising and has no access to guest records or sending tools, the attempt has nothing to reach.
Why it matters
Any AI assistant or agent that reads content from guests, tenants, applicants or the web is exposed to prompt injection, and the consequences scale with what the system can access and do. Designing permissions, approvals and data boundaries outside the model, rather than relying on instructions in the prompt, is what keeps a manipulated response from becoming a data leak or an unauthorised action.