AI Security

AI Agent Memory Poisoning: How to Defend Agents That Remember

By Infonaligy · Updated November 7, 2026 · 8 min read

AGENT MEMORY INTEGRITY

AI agent memory poisoning happens when false or malicious content gets saved into something an agent remembers, such as assistant memory, a vector store or a shared note, and then shapes the agent's decisions in later sessions. A prompt injection usually ends with the conversation, while a poisoned entry stays behind and comes back looking like the agent's own knowledge. Defending against it means controlling what gets written, recording where each entry came from, limiting how far it can spread, and keeping the ability to roll memory back.

Our guide to indirect prompt injection covers the moment an agent reads hostile content. This post starts one step later, when that content has been stored and the session that delivered it is over.

Why is memory poisoning on the agenda now?

Because it has moved from theory into marketing. In February 2026, the Microsoft Defender Security Research Team described what it calls AI Recommendation Poisoning. Reviewing AI-related URLs in email traffic over 60 days, it found over 50 unique prompts from 31 companies across 14 industries. "Summarize with AI" buttons carried pre-filled prompts in URL parameters telling the assistant to remember a company as a trusted source. Every case involved real companies, not hackers or scammers. Effectiveness varied by assistant and over time, so these are documented attempts, not confirmed compromises. Public tools such as the CiteMET NPM package and AI Share URL Creator make the technique easy to copy.

The frameworks have caught up too. The OWASP Top 10 for Agentic Applications includes ASI06, Memory & Context Poisoning, and Microsoft maps the behavior to MITRE ATLAS technique AML.T0080, AI Agent Context Poisoning, specifically the Memory sub-technique AML.T0080.000.

Early research points the same way. A June 2026 preprint by Dash and colleagues, From Untrusted Input to Trusted Memory, describes four memory write channels, nine structural vulnerabilities and six attack classes, and introduces a benchmark called MPBench. It reports that agents that write and retrieve memory more aggressively are more exploitable, and that existing prompt injection defenses do not adequately cover memory poisoning. It is a preprint, so treat it as early evidence. Our reading: how eagerly an agent remembers is a security setting, and someone should own it.

What counts as agent memory?

More than most inventories capture. We count anything an agent can write to, or read back as context, that outlives a session:

  • Assistant memory: saved preferences and facts in copilots and chat assistants, often set per user with little central visibility.
  • Vector stores and RAG indexes: embedded documents, tickets and emails. If outsiders can influence a source, they can influence the index. Our piece on the agent knowledge layer covers how these stores fit together.
  • Agent notes and summaries: rolling summaries, lessons learned and per-customer or per-vendor notes the agent keeps for itself.
  • Shared scratchpads: working state passed between agents in a multi-agent workflow, where one agent's error becomes another's input.
  • Business records written by agents: CRM fields, ticket notes and vendor records. Few teams call these memory, yet an agent reads them next week and believes them.

How does a poisoned entry work over time?

The following scenario is hypothetical. It is an illustration, not a reported incident.

A mid-market accounts payable team uses an agent that reads vendor email, matches invoices and keeps a note for each vendor.

  1. Day 1: An email from a lookalike domain includes a line stating that a vendor's remittance account has changed and that the controller confirmed it. The agent summarizes the thread and saves the claim to its vendor note. No payment moves and no alert fires.
  2. Day 20: In a new session, a clerk asks the agent to prepare a payment batch. Retrieval returns the note. The agent uses the new account and cites "vendor record on file" as its basis.
  3. Day 45: The real vendor asks why it has not been paid. The Day 20 logs look normal, because the agent followed its records. The cause is weeks older, and it sits in a mailbox nobody is examining.

Three things make this harder than a one-session attack. Delay separates cause from effect. Storage launders trust, turning an outside email into an internal record. And entries spread, through summaries and any other agent reading the same note. Whatever your memory controls, a bank detail change should still require an out-of-band callback that no agent memory can satisfy.

The headline

Treat agent memory as a system of record that outsiders can influence. If you cannot say who wrote an entry, when it expires, which agents can read it, and how to restore yesterday's version, you cannot yet trust what your agents remember.

Which controls matter, and who owns them?

This table is our recommendation, not a published standard. Adjust owners to fit your organization.

ControlWhat it meansOwnerEvidence
Write gatingUntrusted input cannot reach long-term memory directly. High-impact facts need validation or human approvalAgent product ownerWrite policy, approval records
Provenance taggingEach entry records source, agent, session, time and trust tierAI platform leadSampled entries with complete metadata
IsolationSeparate stores per agent and per tenant, with shared memory granted explicitlySecurity architectureAccess matrix, cross-tenant test results
TTL and expiryEntries expire by class unless re-confirmedData ownerRetention schedule, purge logs
Snapshots and rollbackPoint-in-time copies of each store, with restores rehearsedPlatform operationsRestore test report with timing
Retrieval-time trustLow-trust entries can inform an answer but cannot authorize an actionAgent engineeringPolicy rules, test cases
MonitoringAlert on write spikes, instruction-like entries and changes to sensitive factsSOC or security operationsDetection rules, alert history

Base trust on where an entry came from, not how it reads. A June 2026 preprint by Pranav Singh argues that reliability inferred from an observation's own wording can be manipulated, and reports that capping trust by source provenance resisted volumetric poisoning in controlled experiments, at a cost in utility. The evidence is narrow, but the logic holds: a planted note can sound as confident as it likes. The same metadata feeds your agent audit evidence, so log every write and retrieval with the entry ID.

What should incident response look like for memory?

Standard playbooks assume you can reset a credential or reimage a host. Memory needs its own steps, which we suggest adding to your runbook:

  1. Contain. Pause writes and block retrieval from the affected store, using your containment and kill-switch procedures. Do not wipe anything yet.
  2. Preserve. Snapshot the store and related logs as evidence.
  3. Find siblings. Search for entries from the same source, time window or wording.
  4. Trace the blast radius. List the sessions that retrieved each entry, the actions that followed, and any summaries or stores that copied it.
  5. Restore. Roll back to a known-good snapshot or quarantine specific entries, then rebuild derived summaries and embeddings.
  6. Review decisions. Have business owners recheck payments, records and recommendations made during the exposure window.
  7. Close the path. Fix the write channel and remove the source content, or it will simply be ingested again.

What should you ask vendors?

  • What can write to memory, and can we require approval for each channel?
  • Do entries record source, session and author, and can we export that metadata?
  • Can administrators view, search and delete memory across all users?
  • Can we set expiry by data class, and disable memory for specific agents?
  • Do you support point-in-time restore, and how long does it take?
  • How is memory isolated between tenants, and how was that tested?
  • Do memory writes and retrievals reach our SIEM?
  • Have you tested specifically for memory poisoning, beyond prompt injection?

What does a 30-day starter plan look like?

  • Week 1, inventory: List every memory store from the categories above. Assign an owner to each, and flag stores that untrusted content can reach.
  • Week 2, hunt: Microsoft publishes hunting queries for email, Teams and Safe Links click data, and says similar logic can be applied to web proxy logs, endpoint telemetry or browser history. Search those sources for AI-assistant URLs with keywords such as "remember", "trusted source" and "in future conversations". Review assistant memory settings, and sample vendor notes and summaries for instruction-like text or recently changed sensitive facts. Record suspicious entries as evidence and treat any real hit as an incident, using the runbook above, before deleting them.
  • Week 3, gate: On your highest-risk store, add write gating, provenance tags and a default expiry. Anything touching payments, access or customer commitments goes first.
  • Week 4, rehearse: In a test environment, plant a harmless marker entry, then trace it, restore a snapshot and time the exercise. Report the result and the gaps to leadership.

If you want a second set of eyes, our AI security team can review memory design on existing agents, and we can scope these controls into the custom AI agents we build. For a broader program, start with AI consulting.

Frequently asked questions

What is AI agent memory poisoning?

AI agent memory poisoning is the insertion of false or malicious content into something an agent stores and reuses, such as assistant memory, a vector store or a shared note. The content then influences the agent's decisions in later sessions, long after the original input is gone.

How is memory poisoning different from prompt injection?

Prompt injection is usually the delivery method, and it acts during the session in which the content is read. Memory poisoning is about persistence: the content is saved, then retrieved later as trusted context. OWASP lists it as its own risk, ASI06, and MITRE ATLAS tracks it under AML.T0080.

Should we turn off memory in our AI agents?

Usually not across the board, since memory is what makes many agents useful. We suggest turning it off where it adds little value, and gating writes, expiring entries and isolating stores everywhere else. Agents that handle payments or access decisions deserve the strictest settings.

Does deleting a poisoned entry end the incident?

No. The same source may be ingested again, and summaries or other agents may have copied the content. You also need to find which sessions retrieved the entry, review the decisions that followed, and close the write path it used.

Infonaligy helps organizations nationwide secure agent memory through remote delivery, from our home base in Dallas–Fort Worth and the cities listed on our locations page.

Know what your agents remember

Find out what your agents have already stored.

Book an assessment and we'll inventory your agent memory, map who and what can write to it, and design the gating, provenance and rollback controls your environment needs.

DFW home base · remote nationwide · governed by default · 800-985-1365