From Storage to Steering: Memory Control Flow Attacks on LLM Agents
Zhenlin Xu, Xiaogang Zhu, Yu Yao, Minhui Xue, Yiliao Song

TL;DR
This paper uncovers a new security vulnerability in LLM agents where persistent memory can manipulate control flow, leading to unintended tool usage and behavioral deviations, demonstrated through an automated evaluation framework.
Contribution
It introduces Memory Control Flow Attacks (MCFA) as a novel threat and presents MEMFLOW, an automated framework to identify and measure this vulnerability across various tasks.
Findings
Over 90% of trials vulnerable to MCFA across tested models.
Memory can dominate control flow, overriding explicit instructions.
MCFA poses critical security risks for LLM agent deployment.
Abstract
Modern agentic systems allow Large Language Model (LLM) agents to tackle complex tasks through extensive tool usage, forming structured control flows of tool selection and execution. Existing security analyses often treat these control flows as ephemeral, one-off sessions, overlooking the persistent influence of memory. This paper identifies a new threat from Memory Control Flow Attacks (MCFA) that memory can dominate the control flow, forcing unintended tool usage even against explicit user instructions and inducing persistent behavioral deviations across tasks. To understand the impact of this vulnerability, we further design MEMFLOW, an automated evaluation framework that systematically identifies and quantifies MCFA across heterogeneous tasks and long interaction horizons. To evaluate MEMFLOW, we attack state-of-the-art LLMs, including GPT-5 mini, Claude Sonnet 4.5 and Gemini 2.5…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
