Unveiling Privacy Risks in LLM Agent Memory

Bo Wang, Weiyi He, Shenglai Zeng, Zhen Xiang, Yue Xing +2 more
2/17/2025
cs.CRcs.AI

No official code found. Best implementation: wangbo9719/MEXTRA (37 stars, last commit 2025-12-02).

Abstract

Large Language Model (LLM) agents have become increasingly prevalent across various real-world applications. They enhance decision-making by storing private user-agent interactions in the memory module for demonstrations, introducing new privacy risks for LLM agents. In this work, we systematically investigate the vulnerability of LLM agents to our proposed Memory EXTRaction Attack (MEXTRA) under a black-box setting. To extract private information from memory, we propose an effective attacking prompt design and an automated prompt generation method based on different levels of knowledge about the LLM agent. Experiments on two representative agents demonstrate the effectiveness of MEXTRA. Moreover, we explore key factors influencing memory leakage from both the agent designer's and the attacker's perspectives. Our findings highlight the urgent need for effective memory safeguards in LLM agent design and deployment.

View on arXivView PDF

Code Implementations(1)

wangbo9719/MEXTRACommunity70%

Source code for the ACL'2025 paper titled "Unveiling privacy risks in llm agent memory"

372Python, Jupyter NotebookMay 19, 202510 months ago

Similar Papers

Cite this paper

@article{wang2025unveiling,
  title  = {Unveiling Privacy Risks in LLM Agent Memory},
  author = {Bo Wang and Weiyi He and Shenglai Zeng and Zhen Xiang and Yue Xing and Jiliang Tang and Pengfei He},
  year   = {2025},
  eprint = {2502.13172},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.13172v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.13172.svg)](https://codeofpaper.com/paper/2502.13172)

Discussion