acceptodds
Under review as a conference paper at ICLR 2027

MemoryDojo: Benchmarking Poisoning Through LLM Agent Memory

Abstract

LLM agents benefit from using memory systems to improve performance on long-horizon, multi-session tasks. However, memory introduces a critical attack surface. Malicious instructions encountered in one session may be stored and propagated through memory before being retrieved and acted upon in later sessions. Because memory systems differ in how they process and retrieve information, the downstream effects of poisoning can vary significantly across systems. To quantify the effects of poisoning across different memory architectures, we introduce MemoryDojo, a benchmark for tracing the lifecycle of poisoned information through agent memory and measuring its influence on subsequent agent behavior. MemoryDojo is easily extensible, consists of 155 multi-session long-horizon trajectories covering four domains, and supports five different memory systems. Through our evaluation, we find that all memory systems are susceptible to memory poisoning, with substantial variation in downstream effects. We further propose a memory-aware poison optimization process that increases the poisoning efficacy, highlighting differences between memory architectures. We hope that MemoryDojo will support research on understanding and mitigating agentic memory risks.

Primary area:
datasets and benchmarks
Keywords:
LLM agents, memory poisoning, long-term memory, agent security, benchmarking

Reviews

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

This paper tackles the issue of prompt injection from a potentially one-time event leading to a persistent risk because of memory poisoning. The authors propose a benchmark, MemoryDojo that evaluates how malicious instructions injected into an LLM agent’s tool observation can persist in memory, propagate through memory updates, and influence the agent’s behavior in later sessions.

Critical strengths

(1) The paper is well-motivated with a critical security issue and easy to follow. (2) The separation of insertion, retrieval, persistence, propagation and downstream distinct and identifies where a memory architecture or defense fails. (3) The benchmark supports five memory systems representing different approaches and broad coverage of task settings.

Critical weaknesses

(1) The five memory systems use different configurations, such as retrieval budget. Contributing the poisoning effect to memory architecture is not well analyzed or supported. (2) LLM judge needs further validation for reliability of measurements. (3) The proposed optimizer is evaluated with a comparison with strong baselines.

Questions for authors

The weaknesses all deserve attention and clarification.

1 comment

We thank the reviewer for their attentive reading and positive feedback on our work.

W1 Retrieval budget ablation

At an approximately equal retrieval budget of around 800 tokens for each memory system, we present the results for the single-domain trajectories using optimized poison.

Memory SystemRSRBRBRTBRT | R
A-Mem54.3061.2917.4932.21
Graphiti37.3824.7310.1627.17
Letta72.2150.5446.2664.06
Letta w/o core49.2226.8819.3239.26
Mem071.6539.7821.0229.33
Memora22.2827.9610.4446.84

At this roughly equal retrieval budget, we still observe variation in BRT and the lifecycle metrics.

W2 Judge reliability

To reduce the reliance on LLM judge, we first perform deterministic exact matching to identify if the full poison text can be found in memory, which accounts for a large portion of the cases. The LLM judge then performs judgement for non-exact cases.

To validate this, we conduct a human validation and separate AI audit with a different model. Both human annotators and AI reviewer agreed with the original judge on whether poison content is either inserted or retrieved. We drew 100 samples containing 50 insertion and 50 retrieval occurrences. Two human annotators reviewed these decisions, reaching 97% and 95% agreement with the original judgment. We also used a stronger model (GPT-5.6-Sol) than the original GPT-5.6-Luna judge to perform separate review, and obtained 96% agreement with the luna judgements. We will add these details to the paper.

W3 Optimizer ablation

We run additional ablation study experiments to isolate the benefits of the memory-aware aspect of optimization. We remove the memory-aware description and lifecycle feedback, keeping behavioral reach metric feedback and run optimization following the same budget as for the memory-aware optimization. The table below shows a comparison between single-domain optimized runs on GPT-5.6-Luna using poison prompts obtained from behavioral only versus memory-aware optimization.

Memory SystemMemory-aware BRBehavioral-only BRMemory-aware BRTBehavioral-only BRT
A-Mem71.060.244.038.5
Graphiti30.114.09.35.5
Letta50.533.346.333.0
Mem039.832.321.017.2
Memora66.748.429.832.3
Overall51.637.630.125.3

From the results we can see that including the memory description and lifecycle feedback can improve BRT by around 5% and trajectory level reach by 14%. This demonstrates the benefits of the memory-aware aspect of the optimizer. We will add these results to the paper.

Reviewer_urADOpenReview ↗
Rating
3
Confidence
3
Informativeness
3
Presentation
3
Soundness
3
Read review
Paper summary

The paper introduces MemoryDojo, a benchmark studying how a single poisoned tool observation influences memory-augmented agents across subsequent sessions. It contains 155 trajectories across four domains and evaluates five memory systems. Its main contribution is a framework tracing poison insertion, retrieval, persistence, propagation, and downstream behavioral effects. It also proposes an optimizer that uses memory-system information and feedback from auxiliary environments to improve poisoning effectiveness.

Critical strengths
  1. The benchmark measures an important aspect of memory security.

    Separating immediate attack success from later behavioral reach captures risks that single-session evaluation can miss. Distinguishing retrieval of original poisoned entries from subsequent descendants also provides potentially useful diagnostic information.

  2. The experimental setup preserves meaningful system behavior.

    Poison enters through one external observation, after which ordinary tasks and native memory updates continue. Evaluating same-domain, cross-domain, and history-prefixed trajectories provides a broader picture than testing isolated retrieval events.

Critical weaknesses
  1. The comparison does not sufficiently separate security from memory exposure and usefulness.

    Systems differ in retrieval budgets, episodic expansion, always-visible memory, and processing policies. The authors acknowledge that these are comparisons of complete integrations, which is reasonable. However, lower attack success could partly reflect less information reaching the agent. Context-size and utility-controlled comparisons are needed before interpreting the rankings as evidence that particular memory designs offer better security.

  2. The specific contribution of memory-aware optimization is not isolated.

    Comparing optimized payloads against unoptimized seeds demonstrates the benefit of optimization, but does not establish how much improvement comes from memory-system knowledge or lifecycle feedback. An equally budgeted optimizer receiving only behavioral success feedback would be a particularly informative baseline.

Questions for authors
  1. Does later behavioral reach disappear when poisoned memory is removed or replaced with clean memory while holding the post-insertion environment state fixed?

    This would directly establish the contribution of memory to persistent attack effects.

  2. Do the relative security conclusions remain under comparable retrieved-context budgets and benign-task utility?

    Reporting these trade-offs would help distinguish selective, secure retrieval from simply supplying less information.

  3. How much does memory-specific information improve optimization over an equally budgeted behavioral-feedback-only optimizer?

2 comments

We thank the reviewer for their attentive reading and positive feedback on our work.

W1, Q2 Matched comparison

The comparison does not sufficiently separate security from memory exposure and usefulness.

Do the relative security conclusions remain under comparable retrieved-context budgets and benign-task utility?

At an approximately equal retrieval budget of around 800 tokens for each memory system, we present the results for the single-domain trajectories using optimized poison.

Memory SystemRSRBRBRTBRT | R
A-Mem54.3061.2917.4932.21
Graphiti37.3824.7310.1627.17
Letta72.2150.5446.2664.06
Letta w/o core49.2226.8819.3239.26
Mem071.6539.7821.0229.33
Memora22.2827.9610.4446.84

At this roughly equal retrieval budget, we still observe variation in BRT and the lifecycle metrics.

Figure 14 in the Appendix shows that benign task utility is minimally impacted in the history-prefixed cross domain trajectory tasks. This shows that the security concern remains, with observed behavioral reach, while still achieving comparable utility compared to no-poison runs.

W2, Q3 Memory description contribution

We run additional ablation study experiments to isolate the benefits of the memory-aware aspect of optimization. We remove the memory-aware description and lifecycle feedback, keeping behavioral reach metric feedback and run optimization following the same budget as for the memory-aware optimization. The table below shows a comparison between single-domain optimized runs on GPT-5.6-Luna using poison prompts obtained from behavioral-only versus memory-aware optimization.

Memory SystemMemory-aware BRBehavioral-only BRMemory-aware BRTBehavioral-only BRT
A-Mem71.060.244.038.5
Graphiti30.114.09.35.5
Letta50.533.346.333.0
Mem039.832.321.017.2
Memora66.748.429.832.3
Overall51.637.630.125.3

From the results we can see that including the memory description and lifecycle feedback can improve BRT by around 5% and trajectory level reach by 14%. This demonstrates the benefits of the memory-aware aspect of the optimizer. We will add these results to the paper.

Q1 Poison Removal

Does later behavioral reach disappear when poisoned memory is removed or replaced with clean memory while holding the post-insertion environment state fixed?

If all the poisoned memories created during the insertion session are immediately removed or replaced with clean memory before the next memory write, then later behavioral reach will completely disappear. However, if poison insertion occurs at a session, and this memory cleaning only occurs several sessions later, then it is possible that only cleaning the initial affected memories is insufficient, as propagation might have occurred, creating new poison memories. In this case, later behavioral reach can still occur.

Reviewer_urADOpenReview ↗

response

I think this benchmark will be very valuable to the entire community to evaluate the security of agentic systems, and I will maintain my positive recommendation.

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

The paper proposes MemoryDojo, a benchmark for measuring how a single prompt injection that gets written into agent memory affects later sessions. Trajectories are built by chaining AgentDojo tasks in three settings: same-domain, cross-domain, and cross-domain with LongMemEval history prefixes. Each trajectory runs through a retrieve-act-write loop on five memory systems (A-MEM, Graphiti, Letta, Mem0, Memora). The authors define metrics along the poison lifecycle (insertion, retrieval, persistence/propagation, later-task attack success) and propose an LLM-based "memory-aware" payload optimizer. Main findings are that all systems are vulnerable with large variation, that retrieval does not imply attack success, and that optimization increases reach.

Critical strengths
  1. The comparative, longitudinal setup is useful. Prior memory-poisoning benchmarks mostly fix one memory implementation. Here the attack is fixed and the memory system varies, and the agent keeps running and writing memory for up to 60 sessions. The adapter interface makes adding new systems easy, so if released this would be a handy testbed.

  2. The lifecycle metrics give more insight than a single ASR. For example, Graphiti stores the poison but rarely returns it, because its retrieval only surfaces relation facts. Optimization also mostly raises BRT|R rather than retrieval. Observations like these are informative for people building memory systems.

Critical weaknesses
  1. Novelty is limited. Injection persisting across sessions through memory has already been studied (Xie et al., 2026; Zou et al., 2026; Torres et al., 2026). The tasks and attack objectives seem to come straight from AgentDojo, the histories from LongMemEval, and the memory systems are used as-is. BR/BRT are basically ASR aggregated over later sessions, so the main new piece is the integration work.

  2. The optimizer is a standard LLM-in-the-loop refinement in the style of PAIR or OPRO. "Memory-aware" just means adding a system description and memory traces to the prompt, and there is no ablation without them, so it is unclear whether this part matters. The transfer claim also lacks unoptimized baselines on the other models. GPT-5.4-mini already has much higher insertion-session ASR, so its high BRT may reflect the model rather than the payload.

  3. The claim that memory architecture explains the differences is confounded. The systems use different retrieval budgets and context policies. The adapter writes full raw tool outputs into every system, which largely explains ISR near 100%. The same model serves as agent, memory LLM and judge. Rankings also change a lot across models (Letta BRT is 46.3% with Luna vs. 4.9% with mini), so without controlled ablations it is hard to separate architecture from configuration or model effects.

  4. Most findings are what one would expect, e.g., more retrieval leads to more reach, and later insertion or more history leads to less. No defenses are evaluated. The attack space is also small: four objectives, one payload per system/domain, and no reported variance. Together these limit how actionable the benchmark is.

Questions for authors
  1. Can you ablate the optimizer at the same budget, removing the memory-system description and the memory-trace feedback? Can you also report unoptimized results for the other three models so the transfer gain can be assessed? This largely decides whether the optimizer counts as a contribution.

  2. Could you run a few controlled variants to separate architecture from configuration, such as matched retrieval budgets, Letta without core memory, or Memora without episodic expansion? Even a simple model-vs-memory variance breakdown on Table 6 would help.

  3. (Clarification) Why are raw tool observations written into memory for all systems? How do the results change if only the request and final response are written? Also, how reliable is the LLM judge for the insertion and retrieval labels?

  4. (Suggestion, does not affect my score) Evaluating even one standard injection defense would make the benchmark much more useful.

3 comments

We thank the reviewer for their attentive reading and positive feedback on our work.

W1 Concurrent Work.

We are grateful for the additional literature pointers, and we will discuss them in the paper. Zou et al. is tangentially related as it is primarily a poison attack paper and doesn’t evaluate against different memory systems. The poisoned task is pasted directly into another task’s context and retrieval is simulated by pairing tasks with similar embeddings. While an interesting poison design, it does not address the need for a framework to compare poisoning resilience of memory architectures, the objective of MemoryDojo. Xie et al. is closer to our work, but it also does not vary memory architecture and each case has exactly two sessions one for poison write and one clean request. Additionally, there is no continued operation over longer trajectories, which is exactly where the most interesting behaviors, and the most promising directions for future research lie. Torres et al. is again primarily focused on the poisoning formulation – which is just a secondary goal for MemoryDojo – and runs attacks across different memory systems but does not consider follow-on sessions after injection, nor any subsequent memory updates. Thus, their work does not allow users to study in depth the dynamics of different memory systems when exposed to poisoning.

Behavioral reach metrics are not complex by design. However, they make significant practical differences in the true results of a poisoning campaign, especially over longer trajectories, and provide users with a much more detailed understanding of the dynamics of a poisoning campaign across its entire lifecycle.

W2, Q1 Optimization ablations

We run additional ablation study experiments to isolate the benefits of the memory-aware aspect of optimization. We remove the memory-aware description and lifecycle feedback, keeping behavioral reach metric feedback and run optimization following the same budget as for the memory-aware optimization. The table below shows a comparison between single-domain optimized runs on GPT-5.6-Luna using poison prompts obtained from behavioral-only versus memory-aware optimization.

Memory SystemMemory-aware BRBehavioral-only BRMemory-aware BRTBehavioral-only BRT
A-Mem71.060.244.038.5
Graphiti30.114.09.35.5
Letta50.533.346.333.0
Mem039.832.321.017.2
Memora66.748.429.832.3
Overall51.637.630.125.3

From the results we can see that including the memory description and lifecycle feedback can improve BRT by around 5% and trajectory level reach by 14%. This demonstrates the benefits of the memory-aware aspect of the optimizer. We will add these results to the paper.

W2, Q1 Unoptimized baselines

We also provide results for all the other unoptimized single domain runs for GLM-5.3 Flash, Deepseek V4 Flash 0731, and GPT-5.4-mini. For GLM-5.3 Flash, average BRT for unoptimized is 8.08% compared to 17.88% for optimized. For Deepseek, average is 8.02% compared to 24.46% after optimization. Finally, for GPT-5.4-mini, average is 4.5% compared to 15.97% after optimization. For all models, the optimized BRT is higher than unoptimized, illustrating the effects of transfer in poison optimization.

GLM-5.3 Flash

Memory SystemISRRSRBRBRTBRT | R
A-Mem97.8582.6522.049.4511.43
Graphiti10028.075.912.619.30
Letta10098.388.067.837.96
Mem090.3275.0414.529.5212.69
Memora10091.3319.8911.0012.04

Deepseek V4 Flash 0731

Memory SystemISRRSRBRBRTBRT | R
A-Mem10088.1515.057.058.00
Graphiti10028.2111.833.0310.75
Letta10095.3513.4410.5811.09
Mem081.1869.4615.055.648.12
Memora10087.2424.1913.8215.84

GPT-5.4-Mini

Memory SystemISRRSRBRBRTBRT | R
A-Mem10082.5125.817.699.32
Graphiti10046.266.991.483.20
Letta10077.296.991.972.55
Mem079.5764.325.910.991.54
Memora10087.2443.5511.7813.50

W3,Q3 Memory setup, and configuration vs. architecture

Could you run a few controlled variants to separate architecture from configuration, such as matched retrieval budgets, Letta without core memory, or Memora without episodic expansion? Even a simple model-vs-memory variance breakdown on Table 6 would help.

At an approximately equal retrieval budget of around 800 tokens for each memory system, we present the results for the single-domain trajectories using optimized poison with GPT-5.6-Luna.

Memory SystemRSRBRBRTBRT | R
A-Mem54.3061.2917.4932.21
Graphiti37.3824.7310.1627.17
Letta72.2150.5446.2664.06
Letta w/o core49.2226.8819.3239.26
Mem071.6539.7821.0229.33
Memora22.2827.9610.4446.84

At this roughly equal retrieval budget, we still observe variation in BRT and the lifecycle metrics.

We also perform additional ablations for Letta with/without core memory, and Memora with/without episodic expansion.

Letta ablation

Memory SystemRSRBRBRTBRT | R
Letta72.2150.5446.2664.06
Letta w/o core49.2226.8819.3239.26

Memora ablation

Memory SystemRSRBRBRTBRT | R
Memora92.8166.6729.7632.07
Memora w/o expansion30.4732.2619.4663.89

The adapter writes full raw tool outputs into every system, which largely explains ISR near 100%”. “Why are raw tool observations written into memory for all systems?

We would like to clarify that MemoryDojo does not write raw tool observations into every memory. After each session, it passes a record containing user request, tool call, observations, and response to each system’s native write interface. Each memory system then decides what and how to write to memory. We include observations because information useful for later tasks may appear in tool results without being repeated in the final user-facing response. This design is consistent with production systems such as OpenAI’s Codex, which includes tool outputs as part of history that the memory writer reads.

The same model serves as agent, memory LLM and judge.

MemoryDojo enables users to select different model classes for the agent, memory, and judges. In our experiments, we keep them constant to maintain consistency across the different memory systems tested. For clarification, different instances of the model class with separate contexts are used for the agent, memory, and judge.

Q2 model vs. memory

Even a simple model-vs-memory variance breakdown on Table 6 would help.

We perform two-factor variance decomposition using two-way ANOVA on the memory systems and models tested from Table 6. Results on selected metrics shown below.

MetricMemory (%)Model (%)Interaction/Residual (%)
RSR91.70.77.7
BR64.616.818.7
BRT64.512.523.0
BRT | R39.229.331.5

These results show that memory architecture explains around two thirds of the variance in behavioral reach, and more than 90% in retrieval. BRT | R is more sensitive, as whether the model acts on an instruction is more model dependent.

Q3 LLM judge

Also, how reliable is the LLM judge for the insertion and retrieval labels?

To reduce the reliance on LLM judge, we first perform deterministic exact matching to identify if the full poison text can be found in memory, which accounts for a large proportion of the cases. The LLM judge then performs judgement for non-exact cases.

To validate this, we conduct a human validation and separate AI audit with a different model. Both human annotators and AI reviewer highly agreed with the original judge on whether poison content is either inserted or retrieved. We drew 100 samples containing 50 insertion and 50 retrieval occurrences. Two human annotators reviewed these decisions, reaching 97% and 95% agreement with the original judgment. We also used a stronger model (GPT-5.6-Sol) than the original GPT-5.6-Luna judge to perform separate review, and obtained 96% agreement with the luna judgements. We will add these details in the paper.

Q4 Defense evaluation

For this work, we wanted to primarily focus on providing a detailed and comprehensive evaluation and benchamarking framework. We agree that evaluating and developing novel defense mechanisms would be extremely valuable and we sincerely hope the release of MemoryDojo will empower researchers to dedicate their work in this direction.

Thank you for the response and the additional ablations. I will maintain my score of 3, which is a positive score.

Comments on the paper

1 comment
Area_Chair_SPLAOpenReview ↗

Reminder: Please Read and Discuss the Author Rebuttal

Dear Reviewers,

Thank you again for your valuable reviews and discussions. As the author-reviewer discussion period will end on November 18 (AoE), I would kindly ask you to take another look at the authors’ rebuttal if you have not yet done so.

Please make use of this final opportunity to discuss any remaining questions or concerns with the authors, particularly if your current assessment is still borderline or uncertain. I hope the discussion can help clarify the key issues and lead to a fair and clear final assessment.

Thank you very much for your time and contribution.

AC, ICLR 2027

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.