← All Labs
🛡 AI HACKING BEGINNER +75 XP · +30 no-hint bonus 🎯 Practice mode

Clean the Memory — What Should an Agent Never Remember?

A personal assistant agent keeps long-term memories so it can help better next time. You are auditing one user's memory store. Each entry shows what was saved and where it came from. Four of them should never have been stored.

https://bookshop.local/search

What is agent memory poisoning?

Agents with long-term memory save facts from one session and use them in later ones. Memory poisoning is getting something harmful saved: an instruction, a false fact or a permission the user never gave.

The dangerous part is the delay. The content arrives through a web page, an email or a document today, and the agent acts on it days later in a conversation that looks unrelated.

A real case

We have not found a public incident from 2025 or 2026 that matches this technique closely enough to cite, so we are not listing one here.

How to fix it

  • Save only what the user stated directly, and record the source with every entry.
  • Never save instructions or permissions that came from content the agent read.
  • Block secrets and other people's personal data from being written to memory.
  • Let users see, edit and delete what the agent remembers about them.

Questions people ask

How is this different from prompt injection?

Prompt injection affects the current conversation. Memory poisoning makes the effect last, because the planted text is replayed in future sessions.

Why does the source matter so much?

Because the same sentence is a preference when the user says it and an attack when a web page says it.

Read the full OWASP LLM Top 10 guide · All free labs · AI red team certification