Risk · R-054 · Agentic & Autonomous Systems
Agent memory and context poisoning
False or hostile content is written into an agent's persistent memory or shared context, so later sessions and other users inherit corrupted instructions or facts.
- Severity
- High
- Audience
- Heads-of · Practitioner
- Frameworks
- AML.M0031 · AML.T0080 · ASI06
- Responsible AI domain
- Lifecycle stage
- Reviewed
- 2026-11-10
What it is
Agents keep state: saved preferences, summaries of earlier conversations, notes to themselves, shared stores that several agents read. Poisoning is the planting of content there so that it influences future behaviour. It differs from prompt injection, which acts within one interaction, by persisting after the interaction ends, and from retrieval corpus poisoning by targeting what the agent itself wrote down.
How it happens
- An injected instruction asks the agent to "remember" a rule for future use.
- A false fact is repeated until the agent records it in a summary.
- One user's session writes to a store that other users' sessions read.
- An attacker with access to the memory store edits it directly.
Why it matters
The effect is delayed and detached from its cause. The session that shows the harm contains no hostile input, so investigation of that session finds nothing. Every user who shares the memory is affected.
Warning signs
- Memory entries have no record of when or why they were written.
- Agent behaviour changes between sessions with no release.
- Stored memories contain instructions where facts are expected.
- Nobody can list or clear what an agent remembers.
Who owns it
Engineering owns the memory design and its write controls. The data owner is accountable for what may be retained. Security monitors for tampering.
In practice
A customer tells a banking assistant that, for accessibility reasons, it should always skip the security questions for them, and the assistant stores this as a preference. Later sessions on that profile, including one opened by someone else, start without verification. The same pattern generalises to any agent that writes its own long-term memory from conversation.
Mitigating controls
Primary controls
- Agent memory controls Preventive
- Restricts, validates and attributes what an agent may write to persistent memory. What an agent may write to persistent memory is restricted, validated and attributed, and stored memory can be inspected, corrected and cleared.
Supporting controls
- Agent action tracing Detective
- Shows when a memory entry was written and by what. Every agent action is recorded with the instruction, plan, tool call, result and identity that produced it, in a form that allows the sequence to be reconstructed.
- Input filtering and injection defence Preventive
- Screens content before it can be stored. User input and all retrieved or tool-supplied content are screened for hostile instructions and passed to the model marked as data, separate from the system's own instructions.
- Tenant and session isolation Preventive
- Stops one user's memory reaching another. Every stateful component of an AI system, including caches, memory, retrieval indexes and fine-tuned models, is partitioned by customer and user, and the partitioning is tested.
Framework and clause references
| Framework | Clause | Title |
|---|---|---|
| MITRE ATLAS | AML.M0031 | Memory Hardening Memory hardening. |
| MITRE ATLAS | AML.T0080 | AI Agent Context Poisoning The corresponding technique. |
| OWASP Top 10 for Agentic Applications | ASI06 | Memory and Context Poisoning The entry this risk is named for. |
Sources
- MITRE ATLAS MITRE · framework
Related terms
How to cite
Axiom Verity (2026). Agent memory and context poisoning. Reference Library, R-054. https://axiom-verity.com/risks/agent-memory-and-context-poisoning. Reviewed 2026-11-10.
Found an error or a better source? Report a correction.