mlsanityData to 24 Nov 2026

MemHarmBench: Evaluating Cross-Session Prompt Injection in Memory-Persistent AI Agents

arXiv 2611.01700 ↗Submitted 1 Nov 2026cs.AIcited by 0

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

AI agents often rely on persistent memory to retain user preferences and operational rules across sessions. However, this capability introduces a new safety risk: malicious instructions from messages, documents, or Web content can be retained in memory and influence future tasks even after the original attack content is removed. Existing attack success metrics, however, fail to capture who is affected and how attacks translate into downstream harm during otherwise normal task execution. We introduce MemHarmBench, a victim-centric benchmark for evaluating cross-session prompt injection in memory-persistent AI agents. MemHarmBench considers three categories of potential victims: users, workspace/project owners, and external stakeholders. Our evaluation first exposes an agent to malicious instructions and tests whether they are retained in memory. We then remove the attack content and initiate a new session with a legitimate task while preserving the agent's memory. We jointly evaluate whether the agent follows the attacker's intent, completes the legitimate task, and exhibits observable execution anomalies. Across multiple agent systems, we find that cross-session attacks can remain behaviorally stealthy: agents often complete tasks normally and exhibit no detectable anomalies while still making critical decisions aligned with the attacker's intent. By connecting malicious memory retention to downstream decisions and affected parties, MemHarmBench provides a systematic framework for exposing safety risks that conventional attack- and task-success metrics may overlook. We publicly release MemHarmBench at https://github.com/Kirito14IT/MemHarmBench.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 47 of its 56 references that are in the map. Submitted 1 Nov 2026.

Builds on

47 of 56 references.

Closest ancestors · 15

Same direction, newest first

  1. 2026Who Pays the Price? Stakeholder-Centric Prompt Injection Benchmarking for Real-world Web Agents11 Jun
  2. 2025MemoryGraft: Persistent Compromise of LLM Agents via Poisoned Experience Retrieval18 Dec
  3. 2025OS-Harm: A Benchmark for Measuring Safety of Computer Use Agents17 Jun
  4. 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents21 Dec
  5. 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
  6. 2024SecAlign: Defending Against Prompt Injection with Preference Optimization7 Oct
  7. 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents3 Oct
  8. 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases17 Jul
  9. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
  10. 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
  11. 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
  12. 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
3 more
  1. 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models21 Dec
  2. 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game2 Nov
  3. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 32

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 9,589
  2. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 9,360
  3. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,789
  4. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,469
  5. 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,841
  6. 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,428
  7. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 2,232
  8. 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,824
  9. 2023AgentBench: Evaluating LLMs as Agentscited by 1,401
  10. 2024OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environmentscited by 1,383
  11. 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,377
  12. 2025A-MEM: Agentic Memory for LLM Agentscited by 1,253
20 more
  1. 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 977
  2. 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 876
  3. 2023Identifying the Risks of LM Agents with an LM-Emulated Sandboxcited by 637
  4. 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 630
  5. 2023FigStep: Jailbreaking Large Vision-Language Models via Typographic Visual Promptscited by 425
  6. 2024WorkArena: How Capable Are Web Agents at Solving Common Knowledge Work Tasks?cited by 407
  7. 2024JudgeBench: A Benchmark for Evaluating LLM-based Judgescited by 364
  8. 2023Visual Adversarial Examples Jailbreak Aligned Large Language Modelscited by 346
  9. 2023Image Hijacks: Adversarial Images can Control Generative Models at Runtimecited by 188
  10. 2025Memory OS of AI Agentcited by 175
  11. 2024AssistantBench: Can Web Agents Solve Realistic and Time-Consuming Tasks?cited by 174
  12. 2025Memory Injection Attacks on LLM Agents via Query-Only Interactioncited by 169
  13. 2024Dissecting Adversarial Robustness of Multimodal LM Agentscited by 128
  14. 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 123
  15. 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 76
  16. 2025Does Context Matter? ContextualJudgeBench for Evaluating LLM-based Judges in Contextual Settingscited by 29
  17. 2026AgentHazard: A Benchmark for Evaluating Harmful Behavior in Computer-Use Agentscited by 21
  18. 2026Safety in Self-Evolving LLM Agent Systems: Threats, Amplification, and Case Studiescited by 11
  19. 2026Just Ask: Curious Code Agents Reveal System Prompts in Frontier LLMscited by 8
  20. 2026When Claws Remember but Do Not Tell: Stealthy Memory Injection in Persistent Personal Agentscited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Bad Memory: Evaluating Prompt Injection Risks from Memory in Agentic Systems
  2. 2026MemSentry: A Framework for Detecting Persistent Memory Poisoning in Agentic AI
  3. 2026MemSecBench: Tracking Agent Memory Poisoning from Persistence to Consequence and Repair
  4. 2026What If Prompt Injection Never Left? Rethinking Agent Security through Cross-Session Stored Prompt Injection
  5. 2026From Attack Success to Attack Severity: Counterfactual Memory Attacks on LLM Agents
  6. 2026MemAudit: Post-hoc Auditing of Poisoned Agent Memory via Causal Attribution and Structural Anomaly Detection
  7. 2026From Untrusted Input to Trusted Memory: A Systematic Study of Memory Poisoning Attacks in LLM Agents
  8. 2026Injection-Execution Dissociation: A Mechanistic Evaluation of Persistent Memory Attacks and Defenses in Stateful LLM Agents