Memory, context and RAG poisoning
The attacker writes into what the agent remembers or retrieves, so a later session acts on it. The poisoning and its effect can be days and users apart.
- LLM05:2026 Data and Model Poisoning
- LLM09:2026 Vector and Embedding Weaknesses
- ASI06:2026 Memory and Context Poisoning
- AML.T0080 AI Agent Context Poisoning
- AML.T0070 RAG Poisoning
How it works
- 1Agents keep memory between sessions and retrieve documents from knowledge bases to answer.
- 2Anything that can write to those stores, including the agent itself after reading untrusted content, can plant text that later sessions treat as trusted.
- 3The planted entry is retrieved when it matches a future request, so the attack fires long after it was placed.
Real cases on the map
- HighSpring AI: Prompt Injection via Memory Poisoning in PromptChatMemoryAdvisororg.springframework.ai:spring-ai-client-chat, org.springframework.ai:spring-ai-client-chat
- HighOpen WebUI has Knowledge Base Destruction and RAG Poisoning via Unauthorized Collection Overwriteopen-webui
Published advisories whose own titles describe this technique.
What to watch for
- Memory writes that come from untrusted content
- Changes to privileged memory such as standing instructions
- Recently added documents retrieved for sensitive requests
How to defend
- Record where every memory entry came from, and treat untrusted ones as data.
- Restrict who and what may write to memory and knowledge bases.
- Review and expire memory; keep the ability to quarantine it.