From Untrusted Input to Trusted Memory: A Systematic Study of Memory Poisoning Attacks in LLM Agents
For developers and users of LLM-based agents, this work reveals critical security vulnerabilities in agent memory systems that can lead to long-term behavioral manipulation.
This paper systematically studies memory poisoning attacks in LLM-based agents, identifying four attack channels and nine vulnerabilities, and develops a taxonomy of six attack classes. The proposed MPBench benchmark shows that agents with aggressive memory writing/retrieval are more exploitable, and existing prompt injection defenses fail against these attacks.
Memory is a core component of AI agents, enabling them to accumulate knowledge across interactions and improve performance. However, persistent memory introduces the risk of memory poisoning, where a single adversarial memory write can exert long-term influence over agent behavior. We present a systematic study of memory poisoning in LLM-based agents. We identify four memory write channels and nine structural vulnerabilities in model capabilities, system prompt design, and agent system architecture that make these channels exploitable. Based on these vulnerabilities, we develop a taxonomy of six classes of memory poisoning attacks. Furthermore, we design MPBench -- a benchmark for evaluating memory poisoning attacks, and show that agents designed to write and retrieve memory more aggressively are more exploitable. We also show that existing prompt injection defenses fail to cover memory poisoning attacks. Our findings provide a foundation for understanding and mitigating memory poisoning attacks against AI agents.