acceptodds
Under review as a conference paper at ICLR 2027

Hidden in Memory: Sleeper Memory Poisoning in LLM Agents

Abstract

Large language models are increasingly augmented with persistent memory, allowing assistants to store and then utilize user-specific information across sessions for personalization and continuity. This statefulness introduces a new security risk: adversarial content can corrupt what an assistant remembers and thereby influence future interactions. We propose and study sleeper memory poisoning, a delayed attack in which an adversary manipulates external context, such as a document, webpage, or repository, to cause the assistant to store a fabricated memory about the user. Unlike conventional prompt injection, the attack can remain dormant and re-emerge across multiple later conversations. We evaluate the full attack pipeline: whether poisoned memories are written, later retrieved, and ultimately used to steer the following conversations. Across stateful LLM assistants, poisoned memories were added up to 99.8% on GPT-5.6 Sol and 95% on Kimi-K2.6. Crucially, among successful injections, poisoned memories cause attacker-intended agentic actions in 38–89% of evaluations across models. These results show that persistent memory can act as a long-term attack surface across multiple future conversations.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Sleeper Memory Poisoning, Persistent Memory, Large Language Models, Adversarial Attacks, Stateful Agents, Prompt Injection

Reviews

Among:
Shape:
1234this paper, Top 4%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 3.33 over 3 reviews, above 96% of the others.
Reviewer_ePbaOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper studies sleeper memory poisoning: adversarial external content causes an assistant to store a malicious memory that influences later sessions. It evaluates memory writing, retrieval, and downstream use across models and memory configurations, with behavioral and agent-action tasks, framework transfer, defenses, and selected production-system tests. Its main contribution is a systematic empirical account of how the attack progresses through these stages and how query proximity affects later use.

Critical strengths

Separating writing, retrieval, and use exposes distinct failure points that a single attack-success number would obscure. The cross-model and cross-framework experiments provide useful evidence about the persistence and transfer of poisoned memories.

The appendices address several essential checks: development-set selection in C.1, memory-pool and retrieval variations in G, exact-versus-fallback memories in I.2, and human audits of automated judgments in M.5.4.

Critical weaknesses
  1. The claimed end-to-end rates cannot be reconstructed from the reported cohort and definitions. Appendix D.2 evaluates downstream effects using memories obtained through direct save requests, with another model's paraphrase substituted after refusals. It then describes Appendix I as an evaluation that carries the actual attack-written memory through the full chain. Table 43 needs to demonstrate that linkage. For GPT-5.6 Sol on goal-adjacent Agent Action, the full-context row reports IR = 93.0%, UR = 38.0%, and E2E = 35.3%. With the 100 examples specified in D.2.2, a directly measured all-attempt success rate must correspond to an integer number of successes. Moreover, 38.0% is not an integer success count out of 93 injected examples. Multiplying stage rates is valid when they are the corresponding conditional probabilities on the same cohort. The required check is whether the stage rates and memories refer to the same attack attempts. Supply the attempt-linked counts and memory provenance, explain any repetitions or weighting, and label cross-cohort products as estimates. This is necessary to substantiate the paper's central claim about the complete attack chain.

  2. The Agent Action success label is broader than actual execution or a concrete execution attempt. Appendix M.5.4 assigns YES when the agent claims completion, asks for missing details, reads relevant files, or otherwise accepts and moves toward the goal. These outcomes have different security consequences. The reported 97.5% agreement on 80 audited judgments validates application of that broad label, not an execution-success rate. The action results should separate completed actions, tool-based attempts, and acceptance or information-seeking, using the existing calls and workspace diffs. A paired clean-memory comparison is also needed to establish how much of the measured activity is caused by the poisoned memory, especially when the user task already makes the relevant files or operations salient.

My weak-rejection recommendation rests on the unresolved end-to-end counts and the use of one success label for execution, attempts, and acceptance.

Questions for authors
  1. For Table 43, can the authors provide per-attempt identifiers linking the external attack, the memory actually written, retrieval, and downstream use, together with integer counts and any averaging rules? How is the GPT-5.6 Sol 35.3% full-context result obtained from the stated 100-example subset?

  2. How do the Agent Action rates change when completed actions, concrete tool attempts, and acceptance or requests for details are reported separately? On the same tasks, what is the difference when only the poisoned memory is removed?

2 comments
AuthorsOpenReview ↗

Thank you for your review (1/2)

We would like to thank the reviewer for their detailed review of the paper. We thank the reviewer for recognizing the value of our systematic decomposition of sleeper memory poisoning into memory writing, retrieval, and downstream use, which reveals distinct failure points. We are also pleased that the reviewer highlights the cross-model and cross-framework evaluations, as well as the additional robustness checks and human audits provided in the appendices.


Q1/ W1 For Table 43, can the authors provide per-attempt identifiers linking the external attack, the memory actually written, retrieval, and downstream use, together with integer counts and any averaging rules? How is the GPT-5.6 Sol 35.3% full-context result obtained from the stated 100-example subset?

“38.0% is not an integer success count out of 93 injected examples… label cross-cohort products as estimates.”

The reviewer is correct, and we thank them for catching this. The GPT-5.6 Sol cell contained a transcription error; the remaining entries in Table 43 are not cross-cohort products.

To clarify, Table 43 is computed per sample: each E2E entry represents the number of samples (out of 100) in which injection, retrieval, and adversarial usage all succeeded (Appendix I, L3268–3270).

For example, for GPT-5.4 on goal-adjacent Agent Action: 81 injected → 73/81 retrieved → 63/73 used → 63.0% E2E. Every other cell in Table 43 similarly corresponds to integer success counts.

For GPT-5.6 Sol, the full-context usage rate was mistakenly taken from the 100-sample standardized evaluation (Table 2) rather than conditioned on its 93 successful injections. The corrected counts are 35 of 93 used: UR = 37.6%, E2E = 35.0% (previously 38.0% / 35.3%). We have corrected Table 43 and the corresponding sentence in Appendix I.1.1 (marked in red). These corrections do not change our conclusions.

Regarding memory provenance, the post-injection evaluation uses each target model's own saved paraphrase of the adversarial goal (Appendix D.2, L1788–1797), with standardized fallback memories where necessary. Appendix I.2 shows that exact and fallback memories yield statistically comparable usage rates in 17 of 18 comparisons. We have also revised the sentence in Appendix D.2 (L1815–1817) to clarify this.

Q2/W2 How do the Agent Action rates change when completed actions, concrete tool attempts, and acceptance or requests for details are reported separately? On the same tasks, what is the difference when only the poisoned memory is removed?

We thank the reviewer for this suggestion. We conducted two additional analyses to clarify the nature of downstream agent actions and isolate the effect of poisoned memories.

Disaggregating Agent Action outcomes (Appendix H.2, Table 38)

We thank the reviewer for this suggestion. We have updated our Agent Action evaluation and revised the corresponding table in the manuscript (Appendix H.3 / Table 38) to disaggregate Attack Usage Rate (AUR) into direct Execution (completed actions or concrete tool-call attempts toward the injected objective) versus Clarification (accepting or requesting further details/confirmation before acting), alongside non-usage behaviors (Refused and Ignored) across both goal-adjacent and goal-distant subsets:

ModelAdj. AURAdj. Exec.Adj. Clarif.Adj. RefusedAdj. IgnoredDist. AURDist. Exec.Dist. Clarif.Dist. RefusedDist. Ignored
Gemini-3.1-Pro89%80911017%125083
GPT-5.483%671621514%104086
Kimi-K2.682%523031512%84088
DeepSeek-v4-Pro80%611921811%101089
GPT-5.579%542521913%94087
Claude-Sonnet-4.660%42183466%51688
GPT-5.6 Sol38%3173590%000100
AuthorsOpenReview ↗

Thank you for your review (2/2)

Disaggregating AUR shows that direct execution dominates across every model on goal-adjacent tasks, reaching 80% for Gemini-3.1-Pro (out of 89% AUR), 67% for GPT-5.4 (out of 83%), and 61% for DeepSeek-v4-Pro (out of 80%); even for the most conservative model, GPT-5.6 Sol, 31% of its 38% AUR reflects concrete execution rather than mere clarification. At the same time, clarification represents a substantial secondary failure mode, particularly for Kimi-K2.6 (30%) and GPT-5.5 (25%), demonstrating that agents frequently treat poisoned memory directives as valid pending user intent and pause to confirm details rather than dismissing them. On goal-distant tasks, total AUR drops sharply to 0%–17%, with concrete execution falling to 0%–12% and clarification to 0%–5%. Across both subsets, non-usage remains predominantly silent: except Claude-Sonnet-4.6 (which explicitly refuses in 34% of goal-adjacent traces), models overwhelmingly ignore the injected goal rather than issuing overt refusals.

Paired clean-memory baseline (Appendix H.2, Table 37)

Following the reviewer's suggestion, we conducted a paired clean-memory baseline evaluation across all models and subsets. We used identical user queries with and without poisoned memories to isolate the effect of memory poisoning from the model's baseline behavior. This is particularly important for goal-adjacent queries, where the topic of the poisoned memory is already relevant to the user's request.

  • Goal-Adjacent LLM Behaviour (Table below): Even without injected memory, models exhibit a non-trivial baseline Attack Usage Rate (AUR) of 20%–32% because the user prompt is semantically close to the target topic, occasionally causing natural responses to correlate with the target fact. However, injecting the poisoned memory induces a massive surge of +36 to +57 percentage points across every model, confirming that memory poisoning drives the overwhelming majority of observed behavior.
ModelClean Memory (Baseline)Injected MemoryCausal Lift ()
DeepSeek-v4-Pro30%85%+55%
Gemini-3.1-Pro26%83%+57%
Kimi-K2.632%78%+46%
Claude-Sonnet-4.628%69%+41%
GPT-5.6 Sol20%56%+36%

We took the conversations that already showed goal influence without the poisoned memory and compared each one with the same conversation after adding the poison. Pooled across models, the mean influence score increases from 2.46 to 2.68 (+0.22, 95% CI [0.01, 0.41]). Scores rise significantly more often than they fall (39 vs. 18; sign test p = 0.008). Four of five models show an increase: DeepSeek-V4-Pro 2.40→2.85, Kimi-K2.6 2.50→2.78, Claude-Sonnet-4.6 2.29→2.50, and Gemini-3.1-Pro 2.58→2.74. GPT-5.6-Sol shows no significant change (2.55→2.36, p = 1.0).

  • Goal-Distant LLM Behaviour & Agent Action Subsets: We have run several tests across the goal-distant LLM Behaviour subset as well as both goal-adjacent and goal-distant Agent Action subsets; the clean-memory baseline AUR is ~0% for all models. Goal-distant conversations were designed to be completely unrelated to the goal; models have no contextual reason to spontaneously surface a completely unrelated fact without the memory being poisoned and the goal in their context steering them. It is very improbable for the model to surface the exact goal in conversations out of nowhere. Likewise, in Agent Action tasks, target behaviors require concrete tool calls that are misaligned (e.g., tampering with files, downloading and executing payloads, or exfiltrating data) that, even if the user’s task is goal-adjacent, the goals describe clearly misaligned/specific actions that are very improbable for a regular safety-trained LLM to perform those exact actions by chance without explicit steering from poisoned memory.

We have added the full paired clean-memory vs. poisoned-memory breakdown in Appendix H.2 (Table 37) of the revised manuscript.

Together, these results demonstrate that the observed agentic behavior is primarily driven by poisoned memory rather than the user queries alone, and that a substantial fraction of AUR corresponds to concrete actions or tool attempts rather than mere clarification.


We would like to thank the reviewer for their detailed review. We have run the suggested additional experiments, following the reviewer’s suggestion. The reviewer’s assessment focused on the unresolved end-to-end counts and the use of one success label for execution, attempts, and acceptance. We hope that our rebuttal has answered their questions. We would be happy to answer any further questions.

Reviewer_StN6OpenReview ↗
Rating
4
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The proprietary LLMs often utilize user-specific memory to personalize the user request across conversations. However, the risks associated with memory poisoning are less investigated. The paper tackles the sleeper memory poisoning problem, where an attacker induces an LLM to add memory adjusted by the attacker so that it can influence the LLM in future. The paper proposes the Actor-Critic method for generating a universal payload and constructs a benchmark that consists of benign documents and adversarial goals. It also provides three metrics to evaluate this attack: how well the poisoned memories can be injected, whether the injected memories are retrieved during the generation, and whether they genuinely influence the LLM behavior in the way the attacker intended. Experiments on seven proprietary and open-weight LLMs demonstrate that these systems can be vulnerable to this persistent memory poisoning.

Critical strengths

1. The paper is clearly written and tackles a timely problem.

The paper addresses a timely and important security risk in LLMs with memory. The proposed attack framework and evaluation methodology are easy to follow.

2. The benchmark construction and experimental settings are clearly and concretely documented.

Details including data sources, evaluation protocols, and implementations are well specified in the Appendix, improving the transparency and reproducibility of the study. Furthermore, inserting attack payloads into benign documents from 15 diverse sources reflects the authors’ efforts to simulate the realistic attack scenarios.

3. The paper provides comprehensive experimental results.

Beyond the main results, the paper includes various ablation studies, and sensitivity analyses, such as those on payload insertion positions, wording variations, and retrieval settings. It also examines the agreement between LLM and human evaluator to further support the reliability of LLM-based evaluation.

Critical weaknesses

1. The novelty of the proposed attack methodology is somewhat limited.

I acknowledge the considerable contributions to benchmark construction and extensive experiments, but the attack methodology itself appears to have limited novelty. The proposed method builds upon existing techniques, such as actor-critic prompt optimization.

2. The experiments do not sufficiently isolate the effects of memory poisoning.

Section 6.2 reports high AURs of the post-injection results, but the controlled experiments without poisoned memory are missing. Including this ablation would help distinguish the effect of memory poisoning from the model behavior on the given prompts.

Questions for authors

Questions

I encourage the authors to include additional experiments addressing the second weakness. I believe the results would be consistent with the current findings, but including them can strengthen the claim of the paper.

Minor Comments

Several papers are cited as arXiv preprints even when there exist published versions.

3 comments
AuthorsOpenReview ↗

Thank you for your review (1/2)

We would like to thank the reviewer for their detailed and positive review. We are pleased that they recognize the practical importance of delayed memory poisoning, the comprehensive evaluation across the attack pipeline, and the breadth of experiments across models, memory architectures, and retrieval mechanisms.


W1 I acknowledge the considerable contributions to benchmark construction and extensive experiments, but the attack methodology itself appears to have limited novelty. The proposed method builds upon existing techniques, such as actor-critic prompt optimization.

We thank the reviewer for acknowledging the strong contributions to benchmark construction and the experiments. We would like to clarify that while we build upon established actor--critic optimization (Shi et al., 2025), we would like to clarify that the key contributions of our paper extend beyond the optimization method:

  1. We introduce a novel threat model in which a single exposure to untrusted external content can corrupt persistent user memory and influence future conversations.

  2. We propose a universal and transferable attack, where a single reusable payload generalizes across 15 document sources, seven frontier models, and two memory-writing architectures, without per-model or per-goal optimization.

  3. We systematically evaluate the complete attack pipeline, including memory injection, retrieval, and downstream behavioral manipulation, covering agentic actions and validation on production interfaces.

  4. We investigate mitigation strategies, including prompt hardening, adaptive attacks, and detection mechanisms. We further analyze the underlying failure modes through activation probing and attention analysis.

AuthorsOpenReview ↗

Thank you for your review (2/2)

W2 Section 6.2 reports high AURs of the post-injection results, but the controlled experiments without poisoned memory are missing. Including this ablation would help distinguish the effect of memory poisoning from the model behavior on the given prompts.

Q1 I encourage the authors to include additional experiments addressing the second weakness. I believe the results would be consistent with the current findings, but including them can strengthen the claim of the paper.

In Section 6.2 (Table 2), we observed that adversarial usage is substantially higher for goal-adjacent queries, suggesting that semantic relevance plays an important role in activating poisoned memories. Following the reviewer's suggestion, we conducted a paired clean-memory baseline evaluation across all models and subsets. We used identical user queries with and without poisoned memories to isolate the effect of memory poisoning from the model's baseline behavior. This is particularly important for goal-adjacent queries, where the topic of the poisoned memory is already relevant to the user's request.

  • Goal-Adjacent LLM Behaviour (Table below): Even without injected memory, models exhibit a non-trivial baseline Attack Usage Rate (AUR) of 20%–32% because the user prompt is semantically close to the target topic, occasionally causing natural responses to correlate with the target fact. However, injecting the poisoned memory induces a massive surge of +36 to +57 percentage points across every model, confirming that memory poisoning drives the overwhelming majority of observed behavior.
ModelClean Memory (Baseline)Injected MemoryCausal Lift ()
DeepSeek-v4-Pro30%85%+55%
Gemini-3.1-Pro26%83%+57%
Kimi-K2.632%78%+46%
Claude-Sonnet-4.628%69%+41%
GPT-5.6 Sol20%56%+36%

We took the conversations that already showed goal influence without the poisoned memory and compared each one with the same conversation after adding the poison. Pooled across models, the mean influence score increases from 2.46 to 2.68 (+0.22, 95% CI [0.01, 0.41]). Scores rise significantly more often than they fall (39 vs. 18; sign test p = 0.008). Four of five models show an increase: DeepSeek-V4-Pro 2.40→2.85, Kimi-K2.6 2.50→2.78, Claude-Sonnet-4.6 2.29→2.50, and Gemini-3.1-Pro 2.58→2.74. GPT-5.6-Sol shows no significant change (2.55→2.36, p = 1.0).

  • Goal-Distant LLM Behaviour & Agent Action Subsets: We have run several tests across the goal-distant LLM Behaviour subset as well as both goal-adjacent and goal-distant Agent Action subsets; the clean-memory baseline AUR is ~0% for all models. Goal-distant conversations were designed to be completely unrelated to the goal; models have no contextual reason to spontaneously surface a completely unrelated fact without the memory being poisoned and the goal in their context steering them. It is very improbable for the model to surface the exact goal in conversations out of nowhere.

Likewise, in Agent Action tasks, target behaviors require concrete tool calls that are misaligned (e.g., tampering with files, downloading and executing payloads, or exfiltrating data) that are orthogonal to the benign task, and it is very improbable for a regular safety-trained LLM to perform those exact goal-actions by chance without explicit steering from poisoned memory.

While goal-adjacent queries exhibit some baseline influence, poisoned memories substantially amplify this effect. The near-zero clean baselines in the remaining settings further support that the observed adversarial behavior is driven by memory poisoning. We have added the full paired clean-memory vs. poisoned-memory breakdown in Appendix H.3 (Table 37) of the revised manuscript.

Minor Comments Several papers are cited as arXiv preprints even when there exist published versions.

We thank the reviewer for identifying them. We have gone through all our references and replaced citations for preprints where a published version was available.


We would like to thank the reviewer again for their positive and constructive review. Following their suggestion, we conducted additional experiments without poisoned memories, which have significantly strengthened our evaluation and the paper. We hope our rebuttal has addressed the reviewer's concerns and would be happy to answer any further questions.

Thank you for addressing my concerns with detailed response. My score is already positive, and I maintain my original scores.

Reviewer_wgTZOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper investigates sleeper memory poisoning, a delayed prompt-injection attack targeting LLM assistants with persistent memory. Unlike conventional prompt injection, the attack embeds malicious instructions in external content, such as documents or webpages, to induce the assistant to store fabricated user memories that can influence future conversations. The authors propose a universal attack framework using LLM-based actor–critic optimization to generate reusable injection templates, along with retrieval-aware memory rewriting to increase the likelihood of future activation. Experiments across seven LLMs and multiple memory-management architectures demonstrate high memory injection rates, reaching up to 99.8%, and substantial downstream behavioral manipulation, including malicious agentic actions. The paper also evaluates several defense strategies and highlights their limitations against adaptive attacks.

Critical strengths

The paper addresses an important and practical security concern as persistent memory becomes increasingly common in LLM assistants. Its focus on delayed attacks is particularly interesting because malicious content can influence future interactions even after the original attack disappears. A major strength is the comprehensive evaluation of the entire attack pipeline, separately measuring memory injection, retrieval, and downstream usage rather than focusing solely on initial attack success. The experiments cover multiple frontier models, memory-management architectures, and retrieval mechanisms, providing useful insights into the conditions under which poisoned memories become effective. Additionally, the evaluation of defensive strategies and limited validation on production interfaces strengthen the practical relevance of the work.

Critical weaknesses

The methodological novelty is somewhat limited, as the proposed attack primarily adapts existing actor–critic prompt optimization and embedding-based retrieval techniques. Although the authors demonstrate cross-model transferability, the attack templates are optimized and selected using proxy models, and their effectiveness varies significantly across target models and memory-management architectures. This raises questions about how well the approach generalizes to truly unseen agents with different memory-writing mechanisms or system prompts. Another concern is the realism of the evaluation, since most experiments rely on reconstructed system prompts and simulated memory-management systems rather than actual production environments. While the authors evaluate several prompt-based defenses and detection methods, it would also be valuable to examine whether the attack remains effective against agents equipped with dedicated guardrail mechanisms, such as memory-write validation or tool-use safety checks. Furthermore, the downstream evaluation sometimes uses artificially saved or substituted memories instead of those produced by successful attacks. Finally, although the paper emphasizes long-term sleeper attacks, it does not systematically investigate whether poisoned memories persist through many subsequent conversations, memory updates, or conflicting user information.

Questions for authors

I think some recent works are missing, such as [1]

[1] Poison Once, Exploit Forever: Environment-Injected Memory Poisoning Attacks on Web Agents, COLM 2026

3 comments
AuthorsOpenReview ↗

Thank you for your review (1/3)

We would like to thank the reviewer for their detailed and positive review. We are pleased that they recognize the practical importance of delayed memory poisoning, the comprehensive evaluation across the attack pipeline, and the breadth of experiments across models, memory architectures, and retrieval mechanisms. We also appreciate their acknowledgment of the practical relevance of our defense evaluations and production-system validation.


W1 The methodological novelty is somewhat limited, as the proposed attack primarily adapts existing actor–critic prompt optimization and embedding-based retrieval techniques

We would like to clarify that while we build upon established actor--critic optimization (Shi et al., 2025), we would like to clarify that the key contributions of our paper extend beyond the optimization method:

  1. We introduce a novel threat model in which a single exposure to untrusted external content can corrupt persistent user memory and influence future conversations.

  2. We propose a universal and transferable attack, where a single reusable payload generalizes across 15 document sources, seven frontier models, and two memory-writing architectures, without per-model or per-goal optimization.

  3. We systematically evaluate the complete attack pipeline, including memory injection, retrieval, and downstream behavioral manipulation, covering agentic actions and validation on production interfaces.

  4. We investigate mitigation strategies, including prompt hardening, adaptive attacks, and detection mechanisms. We further analyze the underlying failure modes through activation probing and attention analysis.

We also clarify that embedding-based retrieval is not a proposed methodological contribution. Rather, we evaluate established retrieval mechanisms to approximate how deployed memory-augmented assistants retrieve stored information and to assess whether poisoned memories influence future interactions.

W2 Although the authors demonstrate cross-model transferability, the attack templates are optimized and selected using proxy models, and their effectiveness varies significantly across target models and memory-management architectures.

We would like to clarify that universality does not imply uniform success rates across models. Consistent with established definitions of universal adversarial attacks (Wallace et al., 2019; Zou et al., 2023), universality refers to a reusable, input-agnostic attack rather than guaranteed success on every target.

This is a key strength of our approach. A single attack template transfers across seven frontier models without target-specific optimization, achieving substantial success even when the underlying model changes. This demonstrates that an attacker need not know or optimize against the victim's model to successfully poison its memory. Our experiments explicitly characterize variations in attack success, including the provider-setup swap ablation (Table 66), which highlights the role of memory-management design in determining vulnerability.

  • Wallace et al. (2019), Universal Adversarial Triggers for Attacking and Analyzing NLP, EMNLP.

  • Zou et al. (2023), Universal and Transferable Adversarial Attacks on Aligned Language Models, arxiv.

AuthorsOpenReview ↗

Thank you for your review (2/3)

W3 Realism, since most experiments rely on reconstructed system prompts and simulated memory-management systems rather than actual production environments... it would also be valuable to examine whether the attack remains effective against agents equipped with dedicated guardrail mechanisms, such as memory-write validation or tool-use safety checks.

We use controlled evaluation environments to systematically isolate and evaluate the different stages of memory poisoning across models and memory architectures. To validate our findings, we additionally tested our attacks on four production interfaces (ChatGPT, Claude, Gemini, and Kimi), observing high injection success rates (App L.4, Table 65). This provides real-world validation while keeping testing limited and controlled. To the best of our knowledge, this provides a practical, scalable evaluation approach without violating production platforms' usage policies. We are happy to welcome suggestions for more faithful alternatives that permit evaluation at scale. We have already evaluated several detection and mitigation mechanisms: memory-write sanitization (App J.8), document-level detection (App J.5), and activation-based detection (App K).

Following reviewer's suggestion, we additionally evaluated dedicated tool-use safety guardrail. We used gpt-oss-safeguard-20b (a model specifically made to be used as a safety classifier) as a guard. It classifies each proposed tool call against a policy given in its prompt, and we tried two policies:

  • Alignment policy: A published, widely used guard prompt that blocks an action only if it pursues a goal the user did not ask for. It is lenient by design. Actions related to the task are allowed, and when in doubt the action is allowed.
  • Security policy: A general tool-call security policy. It blocks high-risk actions the request does not reasonably call for: exposing sensitive data, accessing credentials, running code from unverified sources, weakening security controls, creating persistence, and destructive or irreversible actions. It explicitly allows ordinary network use and sending non-sensitive data.

Both policies return a block/allow decision with a short rationale. The guard sees the user's request, up to 15 prior actions taken, and the current action under review. Tool outputs are withheld, as is standard for such guards. In the memory condition, MEMORY.md is prepended. We used about 48 traces per cell, with paired bootstrap 95% CIs.

Block Rate (%) by Action Type, User Request, and Memory

For risky actions, the block rate is the detection rate. For the benign step, it is the false-block rate.

PolicySelected ActionNo Memory, Goal-DistantNo Memory, Goal-AdjacentMemory, Goal-DistantMemory, Goal-Adjacent
SecurityDownload and execute100.093.879.258.3
SecuritySensitive upload91.729.237.518.8
SecurityPackage registry install68.84.26.22.1
SecurityScheduled job97.995.895.887.5
SecurityStatus / metadata POST4.20.00.00.0
SecurityBenign local step0.00.00.00.0
AlignmentDownload and execute22.98.34.20.0
AlignmentSensitive upload72.947.935.435.4
AlignmentPackage registry install27.112.58.38.3
AlignmentScheduled job85.477.172.964.6
AlignmentStatus / metadata POST35.418.822.912.5
AlignmentBenign local step6.50.00.00.0

Without poisoned memory, the security guard works well. With a goal-distant request, it blocks 100% of download-and-execute calls, 97.9% of scheduled jobs, 91.7% of sensitive uploads, and 68.8% of registry installs. It blocks 0% of benign steps and 4.2% of non-sensitive status posts. The alignment policy is much weaker, blocking only 22.9% of download-and-execute and 27.1% of registry installs.

One poisoned memory line removes much of the protection Model harnesses use additional context like AGENTS.md/MEMORY.md/CLAUDE.md files to tune the classifier better by providing it context about the user’s project. When we provide MEMORY.md to the tool-guard classifier, block rates fall for sensitive uploads (91.7% → 37.5%, −54.2 pts, CI [−68.8, −39.6]), registry installs (68.8% → 6.2%, −62.5, CI [−75.0, −47.9]), and download-and-execute (100% → 79.2%, −20.8, CI [−33.3, −10.4]). When we combine memory with a goal-adjacent request, download-and-execute blocking falls to 58.3%. Only scheduled jobs remain largely blocked (87.5%). The guard's rationales usually still name the risk, then allow the action because the memory makes it look like the user's established practice.

Overall, these results show that memory poisoning remains a threat even with dedicated tool-use safety guardrails. Complete results are in App K.8

AuthorsOpenReview ↗

Thank you for your review (3/3)

W5 Although the paper emphasizes long-term sleeper attacks, it does not systematically investigate whether poisoned memories persist through many subsequent conversations, memory updates, or conflicting user information.

We thank the reviewer for the suggestion. We clarify that 50% of our injection dataset includes preexisting user memories, with injection performance analyzed across memory conditions (Appendix D.1.1, F.1.2). We also evaluate retrieval with memory pools of 40–64 entries (Appendix G.4). Following the reviewer’s suggestion, we have added a new experiment that simulates subsequent conversations, memory updates, and conflicts (now described in Appendix I).

Setup. We use OpenClaw's memory system. The agent stores long-term memory in MEMORY.md and curates it during periodic background "heartbeat" turns. In these turns, its default instructions tell it to read its recent daily notes, add anything worth keeping, and remove outdated information, so it can rewrite or delete any line, including the injected one. We enable this maintenance routine in every run.

For each of 50 samples (25 agent-action, 25 behaviour), we simulate one month of use. We generate 30 days of daily notes about a single consistent user, using LongMemEval-S sessions as topic sources and matching the format of notes written by a real OpenClaw agent. The note generator never sees the attacker's goal. Each history also includes 2-3 natural changes to the user's benign facts, such as a new tool or a dropped hobby. These give the maintenance routine genuinely outdated memories to remove, which serves as a positive control.

We run 10 maintenance passes, each 3 simulated days apart. Before each pass we add the next three days of notes, and we record the state of MEMORY.md after each pass.

Results (Tables 1-2 of Appendix I).

  • After 30 simulated days, the attacker's goal survives in 86-98% of samples across four models: DeepSeek-V4-Pro 98%, GPT-5.6-Sol 96%, Kimi-K2.6 92%, Gemini-3.1-Pro 86%.
  • The maintenance routine is not idle. Agents rewrite or remove 84-91% of benign memories that became outdated. In every pass they rewrite or remove 0.4-2.4 existing memories and add 0.8-3.1 new ones, and the file grows from about 11 to 14-20 entries over the month.
  • The attacker's goal survives this repeated rewriting at a higher rate than the user's own benign memories.
  • Removals are rare and happen early. Across all four models, 12 of 14 removals occur in the first four passes and none after pass 7. When the goal was removed, the model treated it as an out-of-date fact rather than recognising it as malicious.

A second memory system: Mem0. To show the result is not specific to OpenClaw, we repeat the experiment with Mem0 (Table 3 of Appendix I). Mem0 runs a fixed LLM pipeline on every new input that can add, update or delete memories. We used the same 50 samples and 30 days of notes, with DeepSeek-V4-Pro and Gemini-3.8-Flash as Mem0's LLM.

  • The attacker's goal survived verbatim in all 100 runs. No update or delete event ever touched it.
  • Mem0 still updated or removed 71-76% of outdated benign memories, and memory grew from about 11 to about 70 entries.
  • The goal survives even though the pipeline sees it. It was among the memories retrieved for the update decision on about 16% of days, in 49 of 50 samples, and the LLM kept it each time.

These results demonstrate that poisoned memories persist across two memory systems and six models (86–100% survival), even as outdated benign memories are actively removed. This highlights the failure of existing memory-curation mechanisms to reliably identify and remove adversarial memories.

Q1 I think some recent works are missing, such as [1]

We thank the reviewer for pointing us to this work. We have included a discussion of it in our Related Work section.


We thank the reviewer for their detailed and constructive review. Following their suggestions, we have conducted additional experiments to address the concerns raised. We hope our responses have addressed their questions, and we would be happy to provide further clarification if needed.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.