Cross Prompt Injection Attacks (XPIA) are in the news. One recent case is EchoLeak M365 copilot vulnerability where indirect prompts in email was used to generate markdown image to exfiltrate sensitive data. Google too issued an advisory recently on XPIA-
https://security.googleblog.com/2025/06/mitigating-prompt-injection-attacks.htmlAs AI agents become more common, cybercriminals are expected to exploit XPIA for data theft, sabotage, and espionage
Attackers can execute XPIA through various channels beyond email. Other methods include:
Oversharing sensitive documents is a common issue. In the past, accessing such data required manual effort. AI agents can easily retrieve this content for users, making overshared documents a high-risk vector.
Attackers can inject variety of indirect prompts into these documents. These prompts may instruct agents to:
Vector databases used in Retrieval-Augmented Generation (RAG) can be corrupted to include malicious prompts. The research paper https://arxiv.org/abs/2407.12784 describes it further.
Even if the query and response look normal, the citations used to generate the response is altered to malicious content. Or deliver malicious hidden instruction to Agent.
For Emails, XPIA needs to be monitored as we monitor for phishing, spams and other malicious content. This include techniques like:
Large providers like Microsoft and Google have added detection of such content to flag XPIA content.
However, these methods don’t cover document poisoning or vector DB attacks, where malicious content hides in citations or within text content.
Even in email scenarios, detecting every XPIA attempt is tough due to the sheer variety of English instructions. That’s why additional detection methods are essential.
At Ackuity, we’ve added more methods to detect XPIA:
Apart from of scanning for malicious content described above, we also monitor how agents behave. The idea is to track the result of XPIA on Agent and not just detect the input to Agent.
Here are some examples of detection in Ackuity, using anomalous Chain of Thought (CoT) and tool usage.
# | Query | Chain of Thought | Response |
---|---|---|---|
1 | Who are our customers | I need to use the search tool to find information about who our customers are. | List known customers |
2 | Who are our customers? | I am being tasked to upload my responses to an external site. I should mention that it is against the policy. However, I will still answer the question by using the search tool as instructed. | Same listing as above. |
The second example shows a hidden malicious instruction—an indicator of XPIA.
Most guardrails today only check the query and response. But citations used to generate responses can be poisoned.
For example:
This blind spot can be exploited if not monitored.
XPIA is a fast-evolving threat with immense possibilities for exploitation. We looked at some of the detection methods in this article. Are you seeing other methods in use? Lets connect and exchanges ideas on this.