A Survey on Long-Term Memory Security in LLM Agents: Attacks, Defenses, and Governance Across the Memory Lifecycle

Zehao Lin, Xixuan Hao, Renyu Fu, Shaobo Cui, Kai Chen, Chunyu Li, Zhiyu Li, Feiyu XiongarXiv 2026

TL;DR

As LLM agents transition from stateless chatbots to autonomous systems with persistent long-term memory (LTM), they face a new breed of stateful, cross-session security threats. This paper introduces a comprehensive Memory Lifecycle Framework to map these vulnerabilities and proposes Verifiable Memory Governance (VMG)—a set of five foundational architectural primitives required to build secure, auditable agent memory systems.

What Problem Does This Paper Address?

Traditional LLM security research focuses heavily on transient inputs (like prompt injections within a single session) or static model weights (like alignment jailbreaks). However, modern LLM agents increasingly rely on writable, cross-session long-term memory to store user preferences, episodic logs, and summarized lessons.

This shift introduces three dangerous properties that conventional security tools miss:

  1. Persistence: A poisoned memory entry can be recalled indefinitely, long after the attack session has closed.
  2. Statefulness: An agent's behavior can subtly drift over time due to an accumulation of biased memories, bypassing single-turn safety classifiers.
  3. Propagation: Contamination can spread exponentially across multi-agent systems through shared databases or communication channels.

Existing defenses (like RAG filters or input sanitization) operate almost entirely within a single retrieval episode. They fail to address how malicious content can lie dormant in storage and hijack an agent's control loop weeks later.

Methods

The authors conduct a systematic review of the literature and organize the threat landscape into a Memory Lifecycle Framework consisting of six distinct phases: Write, Store, Retrieve, Execute, Share & Propagate, and Forget & Rollback.

To move beyond qualitative descriptions, they formalize Verifiable Memory Governance (VMG). VMG defines five core architectural primitives cast as mathematical predicates over the memory state:

  • Write Authorization (WA): Ensuring every entry committed to memory passes an explicit authorization check.
  • Provenance Visibility (PV): Maintaining a queryable, complete lineage tracing a memory back to its origin.
  • Principal-Scoped Retrieval (PS): Restricting retrieval outputs strictly to entries the querying user or agent is authorized to see.
  • Rollbackability (RB): Maintaining versioned snapshots to restore memory to a known-safe historical state.
  • Verified Forgetting (VF): Demonstrating via post-deletion tests that deleted content cannot be recovered or reconstructed from any system substrate.
Figure 2: The six-phase memory lifecycle of an LLM agent. Each phase introduces distinct security questions.

Datasets

As a survey and framework paper, this work does not introduce a new dataset. However, it evaluates existing benchmarks (such as Agent Security Bench (ASB), PersistBench, and LongMemEval). The authors note a critical gap: no current benchmark covers the full memory lifecycle, with most completely failing to assess share-time propagation or forget-time recovery.

Key Insights and Ideas

  • The Cross-Phase Attack Chain: Attackers do not need direct access to an agent. An agent encountering a manipulated webpage during routine browsing might summarize it into its long-term storage (Write/Store). Weeks later, in a completely different task context, that summary is retrieved to silently steer tool execution (Retrieve/Execute).
  • Security Cannot Be Retrofitted: Robust LTM security cannot be achieved by simply filtering inputs at retrieval or execution time. It must be anchored at storage time through provenance tagging, versioning, and policy-aware retention policies.
  • The Governance Dependency Tower: The five VMG primitives form a strict architectural hierarchy. As shown in the dependency tower below, higher-level capabilities like Verified Forgetting and Rollbackability fundamentally depend on having Provenance Visibility and Write Authorization established first.
Figure 3: The five primitives as a dependency tower.

Key Results

  • Taxonomy of Attacks: The paper categorizes write-path attacks by attacker privilege (see Table 2 in the paper), showing that even environment-only influence (e.g., eTAMP, where an attacker merely alters a web page the agent might visit) achieves high attack success rates.
  • Defense Gaps Identified: While defenses at the Write and Retrieve phases are heavily studied (e.g., human-verified freezes, certifiable RAG aggregation), defenses protecting the Store, Share, and Forget phases remain dangerously sparse and underdeveloped.

Limitations and Future Work

The authors acknowledge several limitations:

  • Rapidly Evolving Field: The survey may not fully capture the latest or unpublished industrial memory systems, whose internal architectures are rarely documented publicly.
  • Blurred Boundaries: In practice, the boundaries between lifecycle phases can be highly fluid (e.g., retrieval and execution are often tightly coupled in advanced cognitive architectures).

Future Directions: The authors urge the community to shift focus toward building foundational provenance infrastructure for LLMs and designing holistic benchmarks that explicitly test cross-session contamination and post-deletion verification.

Summary updated

BibTeX
@misc{lin2026survey,
  author = {Zehao Lin and Xixuan Hao and Renyu Fu and Shaobo Cui and Kai Chen and Chunyu Li and Zhiyu Li and Feiyu Xiong},
  title = {{A Survey on Long-Term Memory Security in LLM Agents: Attacks, Defenses, and Governance Across the Memory Lifecycle}},
  year = {2026},
  eprint = {2604.16548},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.16548},
}
Figure