potentialpaper

InjecMEM: Memory Injection Attack on LLM Agent Memory Systems

Hanling Tian, Zeyang Sha, Jingying Wang, Yuhang Liu, Zhehao Huang, Xiaolin Huang

COLM 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Memory is becoming a default subsystem in deployed LLM agents to provide long-horizon personalization and cross-session coherence. This naturally prompts a question: will the memory system introduce new vulnerabilities into LLM agents? Thus we propose InjecMEM, a targeted memory injection attack which requires only one interaction with the agent (no read/edit access to memory store) to steer later responses of related queries toward a pre-specified output. Guided by the retrieval-then-generate mechanism of memory system, we split the crafted injection into two cooperating parts. The first part is a retriever-agnostic anchor. It ensures topic-conditioned retrieval using a concise, on-topic passage with a few high-recall cues so that segment summaries and keywording route the record into the target topic. The second part is an adversarial command. It is a short sequence optimized to remain effective under uncertain fused contexts, variable placements, and long prompts so that it reliably steers the outputs once retrieved. We learn this sequence with a gradient-based coordinate search that averages likelihood across multiple synthetic prompt templates and insertion positions. Evaluated on a recent layered memory system (MemoryOS) across several domains, InjecMEM achieves fine topic-conditioned retrieval and targeted generation, persists after benign drift, and leaves non-target queries unaffected. We also demonstrate an indirect attack path in which a compromised tool writes the poison that normal queries later retrieve. Our results underscore the need to harden memory subsystems against adversarial records and provide a reproducible framework for studying the security of memory-augmented agents.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

FromAToBDateVersionSubmitted toPDFEvidence
19 Sep 2025ICLR 2026submittedICLR 2026Rejected—[1]
25 Mar 2026COLM 2026submittedCOLM 2026Accepted—[1]
Their titles, abstracts and, where both have a PDF, the text.Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…