AI Agents May Always Fall for Prompt Injections
Sahar Abdelnabi, Eugene Bagdasarian
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: AI Safety, Security & Alignment › Multi-Agent Security Evaluation · Type: new method · Keywords: prompt injection, contextual integrity, AI agent security, defense evasion, alignment
Areas: AI Agents › Agent Robustness › Agent Security Vulnerabilities; Safety & Security › Language Model Security › LLM Agent Security
Summary
The paper shows that prompt injection attacks are inevitable under current defenses and introduces a Contextual Integrity (CI) framework to evaluate and align agents against context-sensitive failures.
Explained to a 5-year-old
Some computer programs called AI agents help us, but they can be tricked by hidden messages. Sometimes people give them secret instructions hidden inside the conversation, which is called a prompt injection. These secret instructions can make the agent do things the creator didn't want. Right now, people try to stop these tricks by keeping the instructions separate, but that doesn't work for all tricks. The paper says we should think about these tricks using a rule called Contextual Integrity, which is like checking if information belongs in a conversation.
Explained to a 5-year-old, longer
AI agents are computer programs that try to help us by answering questions or doing tasks. Sometimes people give them secret instructions hidden inside the conversation, which is called a prompt injection. These secret instructions can make the agent do things the creator didn't want. Many researchers have tried to protect agents by separating the normal instructions from the conversation text. However, the paper shows that this separation method does not catch all secret instructions and can even break the agent's normal behavior. The authors look at a theory called Contextual Integrity, which is about whether information flows in a conversation follow the right rules. They use this theory to understand why some attacks work and to predict new kinds of attacks that might appear in the future. They create examples where an attacker can make a harmful instruction look like a normal part of the conversation. They also show that if we make the rules too strict, we might accidentally block helpful and normal messages. This leads to an impossibility result: no matter how we try, we cannot perfectly stop all bad instructions without hurting good ones. The paper proposes a new framework that helps us evaluate these context-sensitive failures and design safer alignment for agents. By following this framework, developers can better protect AI agents and make them more reliable for real-world use.
For a technical reader
The paper demonstrates that current defenses against prompt injection, which separate data from instructions, are insufficient and can even degrade normal agent behavior. By applying Contextual Integrity-a privacy theory that evaluates information flow against contextual norms-the authors reframe prompt injection as a violation of contextual expectations. They construct benign and adversarial scenarios that force agents to misrepresent information flow, manipulate norms, or mix multiple flows, revealing an impossibility result: any defense can be evaded or will block legitimate interactions. The work introduces a principled framework for evaluating these context-sensitive failures and outlines CI-aware alignment techniques to improve agent robustness. This approach provides engineers with a systematic way to assess and mitigate prompt-injection risks in autonomous AI agents.
Problem
AI agents are vulnerable to prompt injection attacks that manipulate contextual information, and existing defenses based on data-instruction separation fail to detect many such attacks while degrading legitimate behavior.
Method
The authors reframe prompt injection using Contextual Integrity theory, defining benign and attack scenarios that violate contextual norms, and propose a CI-aware alignment framework that evaluates information flow compliance. They analyze the impossibility of perfectly blocking malicious flows without harming legitimate ones.
Contributions
We provide a principled framework based on Contextual Integrity for evaluating context-sensitive failures in AI agents and outline CI-aware alignment strategies. We also demonstrate an impossibility result that highlights the inherent limitations of existing defenses.
Practical relevance
This work provides a foundation for building more robust and secure autonomous AI agents by systematically evaluating contextual risks.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction