What is indirect prompt injection?
Indirect prompt injection is text hidden in a web page that gives orders to your AI (artificial intelligence) agent. If the agent obeys, it acts with your permissions.

Indirect prompt injection
An AI agent is an artificial intelligence (AI) assistant that does more than answer: it acts on your behalf. It reads a page, fetches a code from your email, posts a message. In an AI browser, it works with the sessions you already have open. That’s handy. But it raises a simple question: who does it really obey?
Indirect prompt injection is the worrying answer. The prompt is the text the AI model receives to know what to do. Here, you’re not the one who writes the booby-trapped order. A scammer hides it in a web page or in a comment they post. That’s where the word “indirect” comes from: the instruction arrives through the content the agent reads, not through your request. OWASP (Open Worldwide Application Security Project), a leading community in application security, ranks prompt injection as the number one risk for large language model applications (LLM01:2025).
What the agent actually sends to the model
When you ask the agent to summarize a page, it doesn’t pass only your request to the AI model. It also sends the page’s text, including what you can’t see: white text on a white background, a comment hidden in the page’s code, a spoiler tag in a Reddit comment. Your request and the page arrive together.
Providers train their models to follow an instruction hierarchy and add delimiters around the content they read. But according to the NCSC, the UK’s National Cyber Security Centre, today’s large language models enforce no security boundary between instructions and data. Nothing truly forces the model to keep an order separate from a piece of data. It can mistake one for the other.
How the attack works
- The scammer hides an instruction. They slip it into a page or a public comment, in a form you don’t notice.
- You ask for a summary. You trust the agent and ask it to read the page for you.
- The model confuses the two. The hidden instruction arrives with your request, and the model can treat it as an order.
- The agent acts with your permissions. If it obeys, it acts in your open sessions, with all the permissions you have yourself.
In 2025, Brave demonstrated this on Perplexity’s Comet browser. An instruction hidden under a spoiler tag in a Reddit comment pushed the agent to request a Perplexity login code, read it in Gmail, then post it on Reddit along with the victim’s email address. That was enough to steal their Perplexity account.
Prompt injection is not SQL injection
Many people think a fix will solve the problem, as with SQL (Structured Query Language) injection. Against SQL injection, there’s a known defense: parameterized queries, which keep orders separate from data. In an AI model, that separation isn’t enforced. So the NCSC believes prompt injection may never be fully mitigated the way SQL injection can be. OWASP adds that it’s unclear whether a foolproof prevention method exists. Brave also found that Comet’s fix was still incomplete.
What to do
- Use your AI agent in a separate browser profile, with no online banking or email signed in.
- Give it only the keys for its task: the access it really needs, nothing more.
- Keep in mind that a summary made by the agent can still be manipulated by the page it reads.
- Don’t count on a miracle fix. You reduce the risk. You don’t eliminate it.