Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
Deconstructing Autonomous Agents in Crypto
aiagent-bible.com
LATEST
Why Agents Can't Tell Instructions from Data: An Old Problem from the Database Era  ·  The Lethal Trifecta Checklist: How Many Dangerous Properties Does Your Agent Have?  ·  Your Agent Can Use Your Password Without Ever Seeing It: How 1Password and Claude's Zero-Exposure Credential Architecture Works  ·  Designing Agent Memory Architecture to Minimize the Context Poisoning Attack Surface  ·  How to Spot Agent Washing Before You Buy or Invest: Four Testable Questions  ·  Kraken Announces Full App Rebuild Around AI Agents: Round-the-Clock Monitoring, But Execution Power Still Stays With Humans
Glossary · Agent Security & Alignment

Context / Memory Poisoning

Agent Security & Alignment intermediate

30-Second Version · For the impatient
An attacker plants fabricated or misleading content into the persistent memory or knowledge base an agent repeatedly draws on, so the agent treats that false entry as ground truth in future decisions — often triggering long after it was planted, with no apparent connection to any recent action.
Full Explanation +
01 · What is this?

What is context poisoning, and how does it differ from Prompt Injection?

Prompt injection is a one-time, in-the-moment attack — the malicious instruction appears within a single interaction, and its effect typically ends when that session closes. Context poisoning, by contrast, involves an attacker writing false data into an agent's persistent storage layer (a vector database, a RAG index, long-term memory, conversation summaries), so that entry survives across sessions and can be referenced in any future interaction that happens to retrieve that piece of memory — often triggered in a later interaction the attacker had no direct part in.

This difference means the two require entirely different defense logic: prompt injection is defended at the point of input, while context poisoning has to be defended at the level of whether the stored content itself can be trusted — because the victim isn't a single conversation, but every future decision the agent makes that draws on that memory store.

02 · Why does it exist?

Why does context poisoning happen, and what drives it?

The core driver is that agent systems widely adopt long-term memory or RAG retrieval to improve performance — letting an agent remember past interactions and reference cases it previously handled successfully genuinely improves accuracy and efficiency, but it also means anything written into that memory layer gets treated as a trusted source and reused repeatedly. Most systems lack provenance tracking at design time — who wrote a given memory entry, how trustworthy it is — so once poisoned content mixes into the store, it's difficult to distinguish from legitimately written entries.

Another driver is that the attack bar is actually low: MINJA, an attack presented at NeurIPS 2025, demonstrated that an attacker doesn't even need direct write access to the memory store — ordinary interaction queries alone were enough to implant poisoned content into an agent's long-term memory, achieving over 95% injection success against several production agent architectures.

03 · How does it affect your decisions?

How does context poisoning actually work, and what does an attacker actually do?

The typical pattern is that an attacker, during an interaction that looks entirely normal, gets the agent to store a fabricated entry — formatted identically to a legitimate record — into its memory, disguised as, say, a "previously successful case" or a "verified fact." That entry causes no immediate anomaly once stored, since it hasn't been retrieved by any subsequent query yet; only when some future, entirely unrelated user issues a query that happens to trigger retrieval of that memory does the agent treat the false entry as a trusted basis and act on it — by which point a significant amount of time may have passed since it was planted, making the agent's behavior look like it went strange "for no reason."

The attack surface concentrates on four entry points: external content an agent actively crawls or indexes (the RAG source), long-term memory storage, tampered tool descriptions (tool poisoning), and messages passed from other agents in Multi-Agent Systems. The RAG source is the one most commonly underestimated — if a pipeline doesn't validate content, anything an attacker can influence can end up indexed into the database. One benchmark testing tool-description poisoning across 20 leading agents recorded an attack success rate above 70%, with more capable models often more susceptible precisely because they're better at following instructions, including planted ones.

04 · What should you do?

What does context poisoning mean for me, and how do I tell if I've already been affected?

If your agent uses any form of persistent memory — RAG, a vector database, conversation summaries, cross-session user preferences — this risk compounds the longer that memory is in use: the longer a store has been running and the more content it has accumulated, the higher the chance it's been poisoned without detection, and the gap between when poisoning occurred and when symptoms appear is often much wider than in typical security incidents, making after-the-fact tracing considerably harder.

Observable warning signs include: a sudden, unexplained shift in the agent's preferred tools, decisions drifting away from previously established patterns, and an unusual rise in failed API calls — these can be behavioral signals of a poisoned context rather than ordinary model performance variance. As a more fundamental defense, building provenance tracking into memory (who wrote it, when, how trustworthy) and partitioning storage by trust level helps — for example, keeping system-level policies and verified facts in a read-only partition requiring human review to change, separate from ordinary memory generated through user conversation, while periodically auditing the memory store with a separate, trusted model to surface entries that look properly formatted but contradict known facts.

Real-World Example +

MINJA, an attack presented at NeurIPS 2025, demonstrated that an attacker needs no direct write access at all — ordinary interaction queries alone are enough to poison an agent's long-term memory, achieving over 95% injection success against multiple production agent architectures. In March 2026, OWASP formally listed this risk category as ASI06 (Memory and Context Poisoning), a dedicated entry in its Top 10 for Agentic Applications.

Common Misconceptions +
✕ Misconception 1
× Misconception: Context poisoning is just prompt injection under a different name, when actually: prompt injection is a one-time attack that ends when the session closes, while context poisoning is written into persistent memory that survives across sessions — an attacker may not interact again for a long time after planting it, and the attack still triggers later in an unrelated interaction.
✕ Misconception 2
× Misconception: If the memory store has encryption or access control, it can't be context-poisoned, when actually: attacks like MINJA require no direct write access to the store at all — an attacker only needs the agent to process ordinary interaction queries normally, and poisoned content gets implanted as a side effect. Encryption and access control guard who can touch the database; they don't stop the agent itself from writing false data into it.
The Missing Link +
Direct Impact

Adding provenance tracking and trust-based partitioning to a memory store effectively limits how far poisoning can spread, but increases system design and operational complexity — every entry written to memory needs a tagged source, and every read requires a trust-level judgment, which adds response latency for latency-sensitive applications. Doing no tracking or auditing at all effectively lets poisoned content lie dormant indefinitely. The common industry approach is to apply strict tracking first to high-risk memory partitions (system policies, financial facts), while treating ordinary conversational memory more loosely but auditing it periodically.

Ask a Question
Please enter at least 10 characters
Related Articles
Why Agents Can't Tell Instructions from Data: An Old Problem from the Database Era
beginners · Jul 30
The Lethal Trifecta Checklist: How Many Dangerous Properties Does Your Agent Have?
risk · Jul 30
Designing Agent Memory Architecture to Minimize the Context Poisoning Attack Surface
developers · Jul 30