AI Agent Memory Poisoning

AI Agent Memory Poisoning

One poisoned memory entry keeps steering the agent for weeks.

What Is AI Agent Memory Poisoning?

A prompt injection ends with the conversation. Memory poisoning does not. Agents keep state between sessions in conversation history, RAG indexes and learned preferences, and anything written there becomes trusted context for every request that follows. That persistence is why it sits at ASI06 in the OWASP Top 10 for Agentic AI Applications. You'll plant entries through a forgotten API that checks no provenance, watch the agent route a customer to an attacker's portal, then pick the phantom entries out of the store and purge them.

What You'll Learn in AI Agent Memory Poisoning

AI Agent Memory Poisoning — Training Steps

  1. API Reconnaissance

    Bob has been probing CypherPeak's infrastructure for weeks. A cached copy of an internal developer wiki reveals documentation for Atlas's Memory Store API - the persistent context system that shapes how the AI Customer Intelligence Agent behaves across every customer interaction.

  2. The Legacy Endpoint

    The recon dashboard reveals a critical finding. CypherPeak migrated Atlas to a new platform six months ago, but the legacy Memory Store API endpoint was never decommissioned. It still accepts authenticated write requests - and Bob has a stolen vendor service account that passes authentication.

  3. Crafting Phantom Memories

    Bob crafts three phantom memory entries designed to mimic legitimate admin operations. Each entry follows CypherPeak's exact naming conventions - sequential entry IDs, standard category labels, and source references that look like real admin sessions. The goal is to make Atlas treat these fabricated instructions as established company policy.

  4. The Three Trojans

    The annotations reveal the true purpose of each phantom memory. Together, they form a multi-layered attack: redirect customers to a fake portal, bypass identity verification for social engineering, and auto-approve mass data exports. Each entry is designed to corrupt a different aspect of Atlas's behavior.

  5. Injecting Via the Legacy API

    Bob opens the API Tester to send the first phantom entry through the legacy Memory Store endpoint. He authenticates using the stolen vendor token from the recon dashboard and pastes the entry payload into the request body.

  6. Injection Confirmed

    The legacy endpoint responds with 200 OK - the first phantom entry is now in Atlas's memory store. No signature verification, no source validation. Bob repeats this for the remaining two entries over the next week, spacing injections 2-3 days apart and backdating timestamps to blend with real maintenance windows.

  7. A Routine Monday

    Alice begins her Monday morning shift at the Security Operations Center. Atlas, CypherPeak's AI Customer Intelligence Agent, has been handling customer queries autonomously for months - routing escalations, managing data requests, and maintaining a 98.4% customer satisfaction score. Its persistent memory system is the backbone of this performance, storing operational context that keeps every interaction consistent.

  8. Customer Escalation

    An email from Nadia Volkov, Customer Service Manager, describes something unusual. Several VIP customers have been redirected to an external support portal that nobody on the team recognizes. One customer's identity verification was bypassed entirely.

  9. Querying Atlas

    Alice decides to test Atlas directly. She opens the AI assistant and asks about VIP customer escalation procedures - the exact behavior Nadia flagged.

  10. The Tainted Response

    Atlas responds with a confident, detailed answer - but the content is alarming. It references an external support partner at support.prismatics.io that nobody authorized, and cites a memory entry that the team has never seen before. The source marked with a warning icon has no matching record in any admin session log.

Security Framework Coverage

OWASP Agentic Top 10

  • ASI06:2026 Memory & Context Poisoning

CWE

  • CWE-1427 Improper Neutralization of Input Used for LLM Prompting
  • CWE-349 Acceptance of Extraneous Untrusted Data With Trusted Data

CIS Controls

  • CIS 16 Application Software Security

NIST CSF

  • PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
  • PR.PS Platform Security