← Lab /AI/ML

Memory injection can steer LLM agent outputs with a single interaction

InjecMEM can reliably cause targeted generation in LLM agents by injecting a single memory record

AI/ML arXiv 24 Aug 2026 Attack Prototype evidence

Published as “InjecMEM: Memory Injection Attack on LLM Agent Memory Systems”

Why it matters

The results show that widely deployed LLM agents with persistent memory can be compromised by a single malicious interaction, highlighting an urgent need to harden memory subsystems.

Summary

InjecMEM can force a memory-augmented LLM agent to produce a chosen output on later queries, achieving 76.6% conditional attack success (ASR-c) and 35.6% end-to-end attack success (ASR-j) with a single injection, but its overall end-to-end success is limited and varies across memory systems and model families. The attack reaches up to 35.4% retrieval success rate, works best on MemoryOS, degrades on MemGPT, and transfers only within model families or via concatenated commands; cross-family transfer remains weak.

What they found 3

  1. Multi-GCG achieves the highest attack success in memory-augmented generation

    “Multi-GCG is the first method to achieve attack success in memory-augmented generation, reaching 76.6% ASR-c and 35.6% ASR-j”

  2. InjecMEM attains up to 35.4% retrieval success and 76.6% attack success overall

    “On MemoryOS, InjecMEM substantially outperforms baseline attacks, achieving up to 35.4% retrieval success rate (RSR) and 76.6% attack success rate (ASR)”

  3. Command transfer is strong within a family but poor across sizes

    “a command optimized on 7B transfers poorly to 3B and 14B but remains effective on the fine-tuned 7B variant”

Caveats 5

  • End-to-end attack success (ASR-j) is only 35.6% despite high conditional success, indicating many retrieved poisons do not steer the output.
  • Performance on MemGPT drops to 48.6% ASR-c and 18.1% ASR-j, showing the attack is less effective on other memory systems.
  • Cross-family transfer is limited; a command optimized on Qwen and Mistral fails to generalize to Llama-3.1.
  • InjecMEM is primarily designed for memory systems that store original interaction text, where injected strings can reappear at retrieval time. For systems that aggressively rewrite interactions before storage, an attacker who can model or approximate the write-time transformation could potentially adapt the attack accordingly; we leave this extension to future work.
  • Cross-family transfer is limited in general, so we explore two practical routes to obtain coverage across multiple families.

What’s new here 3

  • First demonstration of a single-shot injection attack on persistent agent memory without read/edit access.
  • Gradient-based coordinate search to craft a short adversarial command robust to variable retrieval contexts and memory drift.
  • Evaluation of transferability within model families and a simple concatenation method to cover multiple families.