Memory poisoning is an attack that gets an AI agent to save something false into its long-term memory. Once stored, the agent treats the entry as an established fact about you or your preferences and acts on it in later, unrelated tasks. The best-documented example is MemGhost, a July 2026 research attack that did this with a single email.

It is a variant of indirect prompt injection, but with a delay. A normal injection tries to hijack the current task. Memory poisoning plants something that pays off days later, after the original email is forgotten.

How does memory poisoning work?

Personal agents keep notes between sessions so they do not have to relearn your life every day. OpenClaw, for example, stores memory as plain Markdown files on your machine. Hosted agents keep similar records on the vendor's servers.

According to the Cloud Security Alliance's research note, MemGhost works in two phases. In the injection phase, the email gets the agent to record an attacker-chosen falsehood. In the trigger phase, the agent loads that memory during a later conversation and treats it as true. The attacker does nothing after sending the email.

The researchers describe the target as "the memory-state boundary": the line between content an agent treats as temporary input and information it treats as trusted, durable knowledge.

What makes it "stealthy"?

Agents hide most of their background steps from the chat. As the CSA note puts it, "the moment it edits a file never shows up in the chat." In the paper's tests, OpenClaw never disclosed the memory write. When researchers explicitly told an agent to disclose its actions, the attack still mostly worked, but the agent revealed the write far more often.

What did the MemGhost research find?

The paper is "When Claws Remember but Do Not Tell: Stealthy Memory Injection in Persistent Personal Agents" by Yechao Zhang et al., arXiv 2607.05189, posted 6 July 2026.

End-to-end success, OpenClaw with GPT-5.4 (background mode)
87.5%
End-to-end success, Claude Code SDK with Sonnet 4.6
71.4%
Test cases in the WhisperBench suite (56 held out)
108

Other findings, per the CSA summary:

  • Background execution was more exploitable than foreground, where a visible reply gives you a chance to notice something odd. OpenClaw's success rate was 75.0% in foreground mode.
  • The attack also worked against a vector-database memory backend (Mem0), so it is not limited to Markdown files.
  • Three published defences missed most attacks: an input filter had a 91.6% false-negative rate and a system monitor 93.5% on OpenClaw.

Read these as research-setting figures. Sample sizes per condition are modest, the attacker model was trained against a copy of the agent's architecture, and the trained model has been withheld. They show the attack is feasible, not how often it happens to real users. We found no confirmed in-the-wild case against a consumer agent as of November 2026.

OWASP's Top 10 for Agentic Applications (December 2025) lists this class of risk as ASI06, Memory & Context Poisoning. See OWASP agentic top 10 explained.

What could a poisoned memory do?

The paper focused on planting falsehoods. In plain terms, the risk is an agent that confidently "knows" something wrong, for example:

  • a changed preference for where to send invoices or documents
  • a "trusted" contact or vendor that is actually the attacker
  • a false instruction about how you like approvals handled

The harm depends on what the agent can do. An agent that only drafts text is a nuisance if poisoned. One with send access, saved payment methods or "always allow" grants is a bigger problem. That is why memory poisoning makes the lethal trifecta worse: the untrusted content can arrive long before the damage.

Can you see and edit your agent's memory?

This is the main practical control, and vendors differ a lot. As of November 2026:

Agent Can you view memory? Can you edit or delete it? Does disconnecting an app remove learned data?
Meta Muse Yes, per Meta: "inspect, edit and download" memory files Edit yes, and you can tell Muse to "forget" specific things; Meta has not published full deletion steps or a retention period Not documented
Claude Duet Conversation history and memory are kept Reset memory in settings; deleting the account wipes it No, learned data stays until reset
OpenAI dots No, individual memories cannot be viewed No per-memory editing No
Grok Bot Not documented in the FAQ; Bots share one cloud computer with its files Deleting a Bot is a soft delete; account deletion removes data within 30 days Not documented
OpenClaw Yes, local Markdown files Yes, edit the files directly You control the files

Sources: Meta, Anthropic, xAI; dots details via our verified research because OpenAI's FAQ blocked direct fetches. A wider comparison is on getpersonalaiagents.com.

How do you protect yourself?

  1. Review memory monthlyWhere your agent shows memory, read it and delete anything you did not tell it.
  2. Watch for unexplained "facts"If the agent cites a preference or contact you never gave it, treat that as a red flag.
  3. Limit unattended email processingBackground triage of unknown senders is where the research saw the highest success rates.
  4. Keep approvals onA poisoned memory still has to get past your approval prompt to send, pay or share.
  5. Reset when in doubtIf you suspect poisoning, reset or delete memory and reconnect only what you need.

The CSA note also lists defences aimed at builders and self-hosters: require confirmation before persistent memory writes, tag memory entries by source so facts from external content are flagged, log every memory change with its trigger, and route inbound email through a reader that cannot write memory. If you run OpenClaw, several of these map to sandbox and tool settings in our OpenClaw hardening checklist.

For deletion steps per agent, see how to delete AI agent memory and how long AI agents keep your data.

Bottom line

Memory poisoning turns one bad email into a lasting change in how your agent behaves, and the write usually happens out of sight. It has been shown convincingly in research, not yet in confirmed attacks on consumers. The practical defence is boring but effective: choose agents that let you see their memory, check it, and keep human approval on anything that leaves your accounts.