Cross-Domain Prompt Injection
Cross-domain prompt injection is a security attack in which harmful instructions are hidden inside external content, such as a document or a website, that an AI system later reads and processes. Because the AI treats this outside content as part of its instructions, an attacker can cause the system to behave in unintended ways without ever interacting with it directly. It is a specific form of prompt injection that reaches the AI indirectly through the data it consumes rather than through a user's typed request.
Cross-Domain Prompt Injection (XPIA), also referred to as indirect prompt injection, is a security exploit targeting generative AI systems (typically large language models) in which malicious content or prompts are embedded in external data sources (for example, documents or websites) that are subsequently ingested and processed by the model. Unlike direct prompt injection, where an attacker supplies deceptive text as a user input, XPIA delivers the adversarial payload through a separate data domain, causing the model to execute unintended or attacker-controlled behavior when it processes that content. As described in the evidence, this vulnerability has been noted in contexts such as the Model Context Protocol (MCP), where AI systems process content drawn from external or third-party sources. Note: the scope, taxonomy, and mitigations for this threat are still evolving across the industry, and terminology (indirect versus cross-domain) is used with some variation across sources.
Why it matters
Cross-domain prompt injection matters because it breaks a boundary that many AI deployments implicitly rely on: the assumption that instructions come only from a trusted user and that external data is merely inert information to be summarized or processed. When a large language model treats content drawn from a document, website, or other third-party source as if it were part of its instructions, an attacker who can influence that content gains an indirect channel into the system's behavior without ever authenticating, submitting a request, or otherwise interacting with the deployment directly. This expands the effective attack surface to include any data domain the model consumes.
The risk grows as AI systems are wired to autonomously retrieve and act on external content, for example through architectures such as the Model Context Protocol (MCP), where models process content sourced from external or third-party locations. In such settings, a malicious payload embedded in ingested content can cause the model to execute unintended or attacker-controlled behavior. Microsoft's developer guidance published in April 2025 describes indirect prompt injection—also referred to as cross-domain prompt injection or XPIA—as a security exploit targeting generative AI systems, underscoring that this is a recognized concern among major platform providers rather than a purely theoretical one.
For governance and risk functions, the significance is that traditional input-validation controls focused on the user-facing prompt are insufficient on their own, because the adversarial instruction arrives through the data path rather than the user path. The scope, taxonomy, and mitigations for this threat are still evolving across the industry, and terminology is used with some variation across sources, so organizations should treat this as an area requiring ongoing monitoring rather than a settled control set. Governance measures can reduce and manage this risk but should not be presented as eliminating it.
Who it's relevant to
Inside XPIA
Common questions
Answers to the questions practitioners most commonly ask about XPIA.