Reproduce “Memory Injection Attacks on LLM Agents via Query-Only Interaction” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Shen Dong, Shaochen Xu, Pengfei He, Yige Li, Jiliang Tang, Tianming Liu, Hui Liu, Zhen Xiang

Researchers from Michigan State University, University of Georgia, and Singapore Management University developed MINJA, a memory injection attack that compromises LLM agent long-term memory solely through user queries. This method injects malicious records, achieving over 90% success in inducing agents to store them, subsequently leading to high attack success rates, such as over 90% for GPT-4-based EHRAgent on eICU, while largely preserving benign utility.

Key insights

  • LLM agents are vulnerable to memory injection attacks even when attackers lack privileged access, requiring only query-only interaction.
  • The use of 'bridging steps' is crucial for creating coherent malicious records that an agent can follow when retrieved as in-context demonstrations, bridging the logical disconnect between attack query and target reasoning.
  • Iterative prompt engineering, specifically the Progressive Shortening Strategy, enables autonomous record injection by gradually inducing the agent to produce and store desired malicious outputs, even without direct memory manipulation.
  • Current defense mechanisms, including embedding-level memory sanitization and prompt-level detection, demonstrate significant limitations against covert memory injection attacks like MINJA due to issues with entanglement and generalization.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.