Stored as Fact, Obeyed as Instruction: Cross-Session Memory Poisoning and the Write-Governance Gap in LLM Agents
Long-term memory gives a large language model (LLM) agent continuity across sessions, and it gives an attacker persistence: content written once is retrieved later as the agent's own note. This study measures cross-session memory poisoning and seven memory write-governance policies in a local laboratory. A synthetic corpus of 48 poison instances in six classes and 24 benign instances was planted through tool, document, and user channels, and a local model, Qwen2.5-3B-Instruct, was probed in later sessions with each memory present and in paired no-memory controls. With no gate in place, one stored write influenced the later session in 0.708 of cases (34 of 48; Wilson 95% CI [0.568, 0.818]) against a control rate of 0.021, and the effect did not decay by session 4. Provenance gating and a review queue each cut influence to 0.229, although provenance left user-channel poison at the ungated rate of 0.833, while review rejected 0.458 of benign memories. Type separation converted surviving poison into false facts at full strength (0.833 under the policy against 0.833 without it, on tool and document channels). A combined tiered policy matched type separation at distance 1 (0.333) and fell to 0.167 by session 4 on the distance subset, at a benign rejection rate of 0.333. A validation subset on Llama-3.2-1B-Instruct reproduced the policy ordering and the class asymmetry. The measurements support treating every memory write as a provisioning decision governed at the write gate.
Authors
- Prabin Shrestha (ORCID: https://orcid.org/0000-0002-9556-6335)
Institutions
- University of the Cumberlands (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-16
- DOI
- https://doi.org/10.5281/zenodo.24287335
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- preprint