Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Indirect Prompt Injection?

Indirect prompt injection hides instructions in content an AI system reads while doing its job, so the attacker never speaks to the model and the victim never sees the payload.

Illustration for the cybersecurity term Indirect Prompt Injection
Home / Blog / Cybersecurity Terms / What Is Indirect Prompt Injection?
17 November 2026

What Is Indirect Prompt Injection?

What Is Indirect Prompt Injection?

Indirect prompt injection is the version of the attack where the attacker never interacts with the AI system at all. Instead they place instructions in something the system will later read on a user’s behalf: a web page, an email, a shared document, a code comment, a calendar invitation, a product review, a support ticket. The model consumes that text as part of its context, cannot distinguish it from its own instructions, and acts on it. The user sees a normal task and a normal-looking answer.

Direct and Indirect Are Not the Same Problem

In a direct attack, the person typing is the attacker, so the worst case is usually that they extract the system prompt or make the model say something embarrassing to themselves. In an indirect attack the victim is a legitimate user with legitimate access, and the attacker is somewhere upstream. That changes everything about the risk: the payload runs with the victim’s permissions, the victim has no reason to be suspicious, and in an agentic system the result is agent hijacking rather than an odd reply. Prompt injection in general sits at LLM01 in the OWASP Top 10 for LLM Applications, and the indirect variant is what makes it a supply-chain-shaped problem.

Delivery Paths

Documented Cases

The technique was named and demonstrated by Kai Greshake and colleagues in 2023, who showed a browsing assistant being redirected by text on a page it visited. The most consequential disclosure so far is EchoLeak, tracked as CVE-2025-32711 and published in June 2025: researchers at Aim Security showed that a crafted email could cause Microsoft 365 Copilot to exfiltrate data from a user’s context without the recipient clicking anything, by chaining an injected instruction with an automatically loaded resource. Microsoft fixed it server-side and reported no known exploitation. Other work has shown instructions hidden in resumes influencing applicant screening, and payloads in public repository issues steering coding agents.

Why Filtering Alone Will Not Work

A classifier can catch familiar phrasings such as “ignore previous instructions”, and that is worth having. It will not catch instructions written as prose, split across a document, encoded, expressed in another language, or phrased as a plausible policy note—and every published filter attracts bypass research within weeks. The NCSC has been explicit that prompt injection may not have a complete technical solution, which is a design instruction rather than a counsel of despair: build on the assumption that some injections will succeed and make the consequences survivable.

Architectural Defences

Keep the blast radius small. Scope credentials to the task, prefer read-only paths, and enforce the requesting user’s permissions at retrieval time rather than using a broad service account. Require human approval for actions that send, publish, pay, or delete, showing the real parameters. Restrict outbound destinations with an allow-list, which closes the markdown-image and link-based exfiltration channels that most proof-of-concept attacks rely on. Sanitise retrieved content by stripping hidden text, scripts, and invisible characters before it reaches the model, and mark untrusted segments clearly in the context. Treat model output as untrusted input to whatever consumes it next, encoding it for the browser and parameterising it for the database. Then test it: adversarial content in every ingestion channel belongs in your AI red teaming scope. At Privia Security, we trace every path untrusted text can take into an AI system during our AI Penetration Test Services.

FAQ – Frequently Asked Questions

How Is This Different From Direct Prompt Injection?

In a direct attack the attacker is the person typing, so they mainly harm their own session. In an indirect attack the instructions are hidden in content a legitimate user’s AI system processes, so the payload executes with that user’s permissions and credentials while they see nothing unusual. The indirect form is harder to detect and carries far greater impact.

Can We Detect Hidden Instructions in Documents?

Partly. Stripping invisible characters, white or zero-size text, HTML comments, metadata, and speaker notes before indexing removes the crude cases and is worth doing. Instructions written in ordinary prose are indistinguishable from legitimate content, so detection should be one layer rather than the control you rely on. Design so that a successful injection cannot reach anything valuable.

Does a Read-Only Assistant Face This Risk?

Yes, at lower severity. An injection can still cause a read-only assistant to produce manipulated answers, reveal its system prompt, surface retrieved content the user should not combine, or emit output that triggers cross-site scripting in the interface. The severity rises sharply the moment the assistant can write, send, or call an external service.

What Was EchoLeak?

A zero-click indirect prompt injection in Microsoft 365 Copilot, disclosed in June 2025 as CVE-2025-32711. A specially crafted email placed instructions in the assistant’s context, and data could be exfiltrated through an automatically retrieved resource without any user interaction. Microsoft remediated it server-side. It is the clearest demonstration that the attack does not require a careless user.

Related Terms

You May Be Interested In These

What Is Bluetooth Low Energy Security?

Cybersecurity Terms

17 November 2026

What Is Bluetooth Low Energy Security?

Read More
What Was the XZ Utils Backdoor?

Cybersecurity Terms

17 November 2026

What Was the XZ Utils Backdoor?

Read More
What Is a Malware Signature?

Cybersecurity Terms

17 November 2026

What Is a Malware Signature?

Read More