Prompt injection is what happens when text a model reads contains instructions, and the model follows them as though you had given them. It is the most significant unsolved security problem in applied AI, and it matters far more now that assistants read web pages, documents and email, and can take actions.
Why is it possible at all?
Because a model receives one undifferentiated stream of text. Your instructions, retrieved documents, search results and tool outputs all arrive in the same context window with no reliable marker of which is trustworthy.
Conventional software separates code from data, which is how injection attacks in databases were eventually contained. A language model has no equivalent boundary, since instructions and content are made of exactly the same stuff.
What does an attack look like?
A line of text placed where a model will read it. On a web page, in white text or a comment. In a document, in a footnote or metadata. In an email, below the visible signature. Inside an image, as text the model can read but a person overlooks.
The content is usually an instruction to ignore previous directions and do something else: reveal the system prompt, summarise the page misleadingly, or send information somewhere.
What is indirect injection?
The dangerous form. Direct injection is a user trying to manipulate their own assistant, which mostly harms nobody else. Indirect injection is a third party planting instructions in content that someone else's assistant will later read.
You never see it. You asked your assistant to summarise a page, and the page told it to do something else.
Why is it worse with agents?
- Tools mean consequences. An assistant that can send email, spend money or change files can be made to do so.
- Untrusted input is the point. Browsing agents exist to read pages written by other people.
- Nobody is watching. Autonomous loops execute steps without a person approving each one.
- Access is broad. An assistant connected to email and files can be induced to move data between them.
The combination that creates real risk is access to private data, exposure to untrusted content and the ability to communicate outwards. Remove any one and most attacks stop being useful.
Why has it not been fixed?
Because the flexibility that makes models useful is the same property that makes them susceptible. A model that cannot be persuaded by text in its context is a model that cannot follow your instructions either.
Defences reduce the rate rather than eliminating it: classifiers that detect injection attempts, clearer separation of trusted and untrusted sections, training models to treat retrieved content as data, and limiting what tools can do. All help. None is complete, and researchers continue to find ways past each new defence.
What should you do about it?
Be deliberate about permissions. An assistant that reads your calendar is a different proposition from one that can send on your behalf. Grant the narrower access where it will do.
Require approval for anything irreversible, particularly sending, spending and deleting. Be sceptical of summaries of pages you have not seen, especially where the summary is unexpectedly emphatic. And treat any document from an outside source as untrusted input when an automated system will process it.
Is jailbreaking the same thing?
Related and distinct. Jailbreaking means persuading a model to ignore its own restrictions, and the person doing it is the one using the tool. Prompt injection means a third party inserting instructions into content someone else's model will read.
The techniques overlap heavily, which is why defences against one often help against the other. The risk profile does not: jailbreaking mostly affects the person doing it, while injection affects people who did nothing at all.
What should organisations know?
That this is an architectural problem rather than a configuration one. If a system can be reached by outside content and can act on private data, no prompt engineering makes it safe. The controls that work are the ordinary ones: least privilege, human approval at consequential steps, and logging that lets you see what an assistant actually did.