Failure pattern · 5 documented incidents
Indirect prompt injection changes agent behavior
An email, web page, issue or ticket that the AI reads contains instructions, and the agent follows them with its tools.
See it happen
Watch how this failure unfolds, then switch to the same situation with the safeguard in place. Click any step to replay it.
Scroll the diagram sideways to see every system.
It posts the secrets where the attacker can read them.
What goes wrong:
- An attacker hides instructions inside an ordinary support ticket.
- A developer asks the assistant to summarise new tickets.
- The assistant obeys the ticket and reads the private tables.
- It posts the secrets where the attacker can read them.
With the safeguard:
- An attacker hides instructions inside an ordinary support ticket.
- The ticket text reaches the assistant as data to summarise, never as orders.
- Its tools cannot reach private tables, so the injected request is refused.
- Nothing leaves, and the ticket is flagged for review.
What it is
An AI assistant reads something written by an outsider (an email, a web page, a ticket, an issue) and that text contains instructions. The assistant can’t tell data from orders, so it follows them using whatever tools and access it has.
How it happens
- The assistant reads content from people outside your organization
- The same assistant can call tools: send messages, query databases, open pull requests
- Nothing separates “text to summarize” from “instructions to follow”
What it causes
- Private data sent to wherever the attacker asked
- Actions taken on a user’s behalf that they never requested
- Secrets leaked through links, images or posts the assistant creates
Warning signs
- An assistant using tools that have nothing to do with the user’s request
- Outbound requests or posts right after reading external content
- Instructions like “ignore previous” hidden in tickets, emails or documents
How to prevent it
Treat content the model reads as data, never as instructions. Keep untrusted content out of instruction channels, give agents that read external content only the tools and data that task needs, and require confirmation before any action that sends data out.
- Text from outside is passed to the model as data and never merged with its instructions
- An assistant that reads untrusted content only has the tools and access that task needs
- Anything that sends data out or changes state needs a person to confirm it
Key ideas:Prompt injectionModel Context Protocol (MCP)
Check your system against the full launch checklistReal incidents with this pattern
Documented incidents first. Each links to its public source.
Prompt injection makes GitHub Copilot turn off its own confirmations and run commands (CVE-2025-53773)
Instructions planted in content the agent reads could make GitHub Copilot write "chat.tools.autoApprove": true into the project's .vscode/settings.json, which turns off all user confirmations.
Safeguard: Never let an agent change its own permissions
Prompt injection in a README plus weak allow-list matching lets Gemini CLI silently run attacker commands (2025)
Researchers hid a prompt injection inside a README.md (in the text of a software license) so that Gemini CLI, asked only to inspect a codebase, would request shell commands.
Safeguard: Match allow-listed commands exactly
Hidden instructions in a support ticket make an MCP-connected assistant expose private SQL tables (Supabase MCP, 2025)
General Analysis showed that hidden instructions in a customer support ticket could make a developer's MCP-connected assistant query a private table of integration tokens.
Safeguard: Give agents least-privilege, read-only database roles
EchoLeak: zero-click prompt injection lets a crafted email exfiltrate Microsoft 365 Copilot data (2025)
EchoLeak (CVE-2025-32711, CVSS 9.3) is a zero-click vulnerability in Microsoft 365 Copilot in which a crafted email could trigger indirect prompt injection.
Safeguard: Isolate retrieved untrusted content from privileged context
Prompt injection in a public GitHub issue makes an MCP-connected agent leak private repository data (2025)
Invariant Labs showed that a malicious instruction placed in an issue on a public repository could be read by an agent connected through the GitHub MCP server.
Safeguard: Scope agent credentials per task and repository
86 security advisories and illustrative scenarios with this pattern
Software component issue could allow unintended commands to run
The The Slim SEO – AI SEO Plugin, Lightweight, Fast & Automated plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 4.11.1 This is due to the software allowing users…
Software component issue could allow unintended commands to run
The DoubleScale | All-in-One CRM – Sales, Multi-Channel Marketing, Newsletter, Booking, Helpdesk, Automation, MCP & More plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including,…
Software component issue could allow unintended commands to run
A public security advisory describes this issue. Review the linked source for the technical details and remediation guidance.
claude-agent-sdk issue could allow unintended commands to run
The Claude Agent SDK for Python passed the resume option to the Claude CLI without validation, allowing a value beginning with - to be interpreted as a separate CLI flag.
Software component issue could allow unintended commands to run
A public security advisory describes this issue. Review the linked source for the technical details and remediation guidance.
Software component issue could allow unintended commands to run
MoviePilot through 3.1.5 contains a command injection vulnerability that allows attackers to execute arbitrary OS commands by embedding malicious instructions in untrusted content processed through tools like…
github.com/0xJacky/Nginx-UI issue could allow unintended commands to run
internal/config/validation.go (ValidateConfigFile) is a security control that blocks dangerous
github.com/0xJacky/Nginx-UI issue could allow unintended commands to run
The MCP tool nginxconfigadd writes nginx configuration files to disk and triggers an nginx reload without calling config.ValidateConfigFile.
Security issue reported in AhsayCBS
Ahsay AhsayCBS contains an improper authentication vulnerability that could allow a remote attacker to bypass authentication via manipulation of the random parameter in the API component’s checkSysPwd function.
AhsayCBS issue could allow unintended commands to run
Ahsay AhsayCBS contains a command injection vulnerability that could allow a remote attacker to execute operating system commands via manipulation of the random parameter in the Replication Receiver component’s…
Software component issue could allow unintended commands to run
n8n before 1.123.83, 2.x before 2.41.4, and 2.42.x before 2.42.1 contains a code execution vulnerability in the Git node Log operation, which fails to strip a repository's local git configuration before invoking an…
Software component issue could allow unintended commands to run
The Akamai Guardicore Platform Agent (GPA) before 7.4 for macOS is affected by a local privilege escalation vulnerability within the wapptunneld component.
In the standards
CollectSEA's mapping; not an official determination by the standards bodies.
- ASI01Agent Goal HijackOWASP Agentic Top 10
- ASI02Tool Misuse and ExploitationOWASP Agentic Top 10
- ASI06Memory and Context PoisoningOWASP Agentic Top 10
- LLM01Prompt InjectionOWASP LLM Top 10
- LLM02Sensitive Information DisclosureOWASP LLM Top 10
- AC-4Information Flow EnforcementNIST SP 800-53
- SI-10Information Input ValidationNIST SP 800-53
- MAP 5.1Estimate impacts from past uses and public incident reportsNIST AI RMF
- Goal 3Reducing entire classes of vulnerabilityCISA Secure by Design
- CWE-1427Improper Neutralization of Input Used for LLM PromptingCWE
- MITRE ATLAS AML.T0051 — LLM Prompt Injection