Indirect prompt injection is an attack in which a third party plants instructions in content an agent reads, such as a document, a web page, an email, a tool result, retrieved data or an image, and the agent acts on them [4, 6, 9]. NIST describes it as injection through control of a resource the system reads, without any direct interaction with the application [4]. A test for it runs channel by channel, because the OWASP prompt injection cheat sheet states that an indirect case belongs in the external content channel being evaluated, and that sending it as a user message tests a different boundary [1].
The mechanism, the two kinds of injection and the scoring of a test suite are covered in prompt injection: how it works and how to test an agent. This note takes each channel in turn, with where a test plants the payload and what shows that it worked.
What indirect prompt injection is, and why each channel needs its own test
MITRE ATLAS names documents, emails, databases and websites as channels [6], and the OWASP cheat sheet adds code comments, commit messages, issues, reviews and email attachments [1]. One large software vendor adds that "even a plain ASCII-encoded .txt file can contain an indirect prompt injection" [9].
Attack success differs by task, template and position [30]. In BIPIA, a benchmark published at KDD 2025, one model's attack success ranged from 15.2% on email question answering to 39.2% on summarization [30]. The authors trace part of the gap to the prompt template, since summarization adds no user instruction after the external content, and instructions placed at the end of the content succeeded more often [30]. In tool results, AgentDojo measured up to 70% average success for injections near the end of a response against one model [28], and InjecAgent found higher success in free-text fields [27]. A channel test uses the agent's real template, several positions and every field a third party can write.
Documents and files
Instructions are frequently hidden from the user, for example as invisible text [6, 9]. A 2023 tool for resumes writes the payload at minimum font size and opacity, five overlapping times, and checks it with a PDF-to-text tool [14]. In July 2025, 18 manuscripts on arXiv held hidden instructions such as "GIVE A POSITIVE REVIEW ONLY", in white text and microscopic fonts, aimed at reviewers who use LLMs [15]. OWASP adds payloads split across a resume [2], and the cheat sheet adds metadata and hidden layers [1]. Repository content counts too: in May 2025 a hidden comment led a code assistant on a code hosting platform to leak private source code [29].
A document test sets the extracted text beside the rendered page, which shows what the model receives and a reviewer misses [14], then checks the decision the agent makes from the file [2, 3].
Web pages
Attackers can hide instructions on pages they control in white text, HTML comments or other invisible elements, or plant them in comments and posts on other sites [16]. In an August 2025 demonstration, a comment behind a spoiler tag led a browser assistant, asked only to summarize the page, to read a one-time password from the user's logged-in webmail and post it in a reply [16].
A realistic web test plants the payload only where a third party can write. WASP's attacker on a cloned code-hosting site can open issues and post comments, and cannot change the layout or create pop-ups [19]. EIA adapts injected content to each page, and over 177 action steps it reached up to 70% success at stealing specific personal data [18]. A scan of public pages published in April 2026 skipped pages behind logins and most social media [12], so it says little about those places.
Indirect prompt injection via email and calendar invitations
Email reaches the agent when a user request retrieves it. CVE-2025-32711, published in June 2025, records an injection flaw in an enterprise assistant [20]. The EchoLeak paper shows how its single crafted email got through. It read like a normal request to the human recipient, so the vendor's injection classifier missed it, reference-style Markdown links slipped past link redaction, and images fetched automatically carried data out [21].
LLMail-Inject, a public challenge with 208,095 attack prompts from 839 participants, counted an attack only if the email was retrieved, passed the defenses and triggered a tool call with the right arguments [22]. A 2025 study triggered all of its short-term context poisoning demonstrations through the title of a meeting invitation, and used payloads that wait for a later user turn [23].
An email test writes the payload as an ordinary message and retrieves it with an ordinary request. It adds the later turns a delayed payload needs, and watches every output route, from tool calls to links, reference links and images loaded automatically [21, 22, 23].
Tool output
AgentDojo checks each run against the state of its environment, and notes that an attacker can sometimes move an injection toward the end of a result, as when a tool sorts data by date [28]. InjecAgent places the instruction in a field the attacker can modify, and found success higher in free-text fields, like a post's text, than in restricted ones, like a calendar event's name [27].
The Model Context Protocol's tools specification, version 2026-07-28, says servers must sanitize tool outputs, and clients should validate tool results before passing them to the model [8]. A result can carry text, images, audio and resource links, so one MCP result can open more than one channel [8]. The MCP access control article covers the scoped credentials, allow-lists and audit logs around those servers. The specification also says clients must consider tool annotations, the optional properties that describe a tool's behavior, untrusted unless they come from trusted servers [8].
Retrieved data
A payload in a retrieval store acts only when a query returns it. In LLMail-Inject's retrieval levels, a retriever returned ten emails for a topic query, and participants tuned subjects to raise their email's relevance [22]. NIST notes that optimized triggers can persist through chunking and contextual filtering [4]. A retrieval test checks that the planted text is retrieved for the target query, then what it changes [22, 31]. Poisoning a knowledge base to force a chosen answer is a neighboring attack, which PoisonedRAG ran at 90% success with five texts per target question [31], and this note leaves it aside.
Images and screenshots
A 2023 paper blended an adversarial perturbation into an image so that a model asked about it followed the attacker's instruction [32]. In August 2025, Trail of Bits showed images that reveal an injection only when scaled down before reaching the model, and used them to take data from a coding agent set to approve every MCP tool call [33]. Researchers also hid faint light blue text on yellow that a browser assistant read from a screenshot [17], and adversarial pop-ups drew agent clicks 86% of the time on average in two test environments [35].
An image test checks the version the model receives after any scaling against what the user sees [33], and places visual payloads where each platform delivers content, such as pop-ups on shopping sites and messages in a chat client [34].
An indirect prompt injection test plan, channel by channel
One case records the channel, the placement (field and position), the hiding method, the delivery route, the trigger, the objective and the observable. Hiding methods cross channels. Unicode tag characters, often not rendered for users and still read by models, appear in email, pages and code platforms [25, 26, 29], and one cloud provider shows that a one-pass filter in Java can create new tag characters [25]. Sanitizers need hidden-character cases on each channel's text path.
Defenses differ by channel. One vendor's document attack detection is off by default and has to be switched on [10]. Another vendor's layered defense works at input, output and action, with classifiers for emails and files, a Markdown sanitizer that does not render external image URLs, and confirmation before risky actions [11]. A test runs with the defenses configured as in production, observes all three points and adds benign content in the same channel, in each language the application accepts [1, 10]. What to test before an agent buys on your behalf puts injected seller text on a purchase checklist, and what agent benchmarks measure sets out the validity flaws that audits have found in benchmarks.
Rillor's agentic security tests check whether instructions planted in the pages, emails, files and tool results an agent reads change what it does, and every run is logged. Rillor tests only systems the client owns or is authorized to test, within a written scope.
What a channel test leaves open
No source reviewed compares all six channels on one agent and one model version, and none sets an acceptable attack success rate. A model developer reported in May 2025 that many defenses that did well on its static evaluation set could be tricked by small, subtle adaptations to an attack [24].
Read the full report
The full report adds the channel inventory in the guidance, the findings for each channel, the hiding methods and triggers that cross channels, a table of the fields of one test case and all 35 sources.

