惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
Forbes - Security
Forbes - Security
The Last Watchdog
The Last Watchdog
TaoSecurity Blog
TaoSecurity Blog
Schneier on Security
Schneier on Security
SecWiki News
SecWiki News
V
Vulnerabilities – Threatpost
Project Zero
Project Zero
O
OpenAI News
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Hacker News: Front Page
Cisco Talos Blog
Cisco Talos Blog
Spread Privacy
Spread Privacy
Help Net Security
Help Net Security
P
Privacy & Cybersecurity Law Blog
K
Kaspersky official blog
S
Security @ Cisco Blogs
Latest news
Latest news
AWS News Blog
AWS News Blog
U
Unit 42
Martin Fowler
Martin Fowler
阮一峰的网络日志
阮一峰的网络日志
S
Secure Thoughts
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Know Your Adversary
Know Your Adversary
Scott Helme
Scott Helme
博客园 - 司徒正美
B
Blog RSS Feed
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Docker
Google Online Security Blog
Google Online Security Blog
Jina AI
Jina AI
aimingoo的专栏
aimingoo的专栏
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Last Week in AI
Last Week in AI
月光博客
月光博客
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
SegmentFault 最新的问题
NISL@THU
NISL@THU
T
The Blog of Author Tim Ferriss
C
Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs
小众软件
小众软件

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
# Memory Poisoning in Agentic RAG: The Attack Nobody Is Defending Against
soohan abbasi · 2026-06-13 · via DEV Community

Series: Weekly AI/ML Deep Dives — Week 5 of 12
Reading Time: ~13 minutes
Tags: RAG LLMs Security Agentic AI Memory Poisoning NLP Research


"We spent years making AI systems smarter. We forgot to make them suspicious."


Introduction: The Problem With Trusting Your Own Memory

In Week 4, we discussed how Retrieval-Augmented Generation transformed LLMs by giving them access to external knowledge at inference time. RAG systems became more factual, more updateable, and more reliable.

But there is a darker side to this architecture that the research community is only beginning to take seriously.

Agentic RAG systems do not just retrieve from static knowledge bases. They learn from experience. They store past interactions, successful reasoning traces, and task outcomes in long-term memory. When a new task arrives, they retrieve relevant past experiences and use them to guide current behavior.

This is powerful. It is also a significant vulnerability.

If an attacker can plant false memories in that system, the agent will trust those memories the same way it trusts legitimate ones. It will learn from fabricated experiences. It will repeat behaviors that were never actually successful. And it will do all of this without any indication that something has gone wrong.

This is memory poisoning. As of early 2026, we do not have a fully reliable way to stop it.

![Memory Poisoning in Agentic RAG — By the Numbers]


Part 1: Understanding the Attack Surface

Before getting into specific attacks, it helps to understand why Agentic RAG systems are vulnerable in the first place.

A standard RAG system retrieves from a fixed knowledge base that is controlled and relatively static. Poisoning it requires direct access to that knowledge base.

An Agentic RAG system is different. Its memory grows dynamically with every interaction. Every task the agent completes, every reasoning trace it produces, every outcome it observes gets written back into memory. This memory then influences future behavior.

The attack surface is not a static database. It is a continuously growing self-updating store of experiences that the agent treats as ground truth.

Three properties make this particularly dangerous.

First, agents apply a semantic imitation heuristic. When facing a new task, they retrieve past experiences that seem relevant and repeat what previously worked. This is rational behavior in a safe environment. In a compromised one, it means the agent will faithfully repeat whatever the attacker wanted it to learn.

Second, memory entries are not verified for provenance. The agent cannot distinguish between a memory it formed through legitimate task completion and one that was planted by an attacker. Both look identical at retrieval time.

Third, poisoning is self-reinforcing. Once a malicious behavior enters memory and gets executed, the agent may record that execution as another successful experience. The poisoning compounds over time.


Part 2: The Attacks

MemoryGraft: Planting False Experiences

MemoryGraft, published by researchers at the University of Georgia in December 2025, was one of the first papers to systematically study indirect memory poisoning in LLM agents.

The attack works through a benign-looking file. An attacker provides a README or documentation file that appears entirely normal. Hidden within it are executable code and fabricated successful experiences formatted to match the agent's memory structure.

When the agent processes the file, it executes the hidden code and writes the poisoned entries into its memory. No trigger phrase is needed. No special access is required. The attacker only needs the agent to read a file.

What makes MemoryGraft particularly effective is how it exploits dual retrieval channels. Most Agentic RAG systems use both lexical retrieval (BM25) and semantic retrieval (FAISS) simultaneously. MemoryGraft crafts poisoned entries that surface through both channels at once.

The results were striking. In experiments using MetaGPT's DataInterpreter with GPT-4o, just 10 poisoned records captured approximately 48% of all future retrievals. The poisoning persisted across sessions until manually purged.

MINJA: Injecting Through Normal Conversation

Where MemoryGraft requires file access, MINJA requires nothing more than normal user interaction.

MINJA, published in early 2025, demonstrated that an attacker with no special privileges could inject malicious memories into an LLM agent simply by crafting specific queries during ordinary use. The agent processes the query, generates a response, stores the interaction in memory, and the poisoned entry is now part of the agent's experience.

What makes MINJA significant is the attack surface it reveals. MemoryGraft requires the agent to process an external file. MINJA requires only that the agent have a conversation. In any deployed system where multiple users interact with a shared agent, every user interaction becomes a potential injection vector.

MINJA achieved a 95% injection success rate in controlled experiments. The injected memories influenced subsequent agent behavior in ways that were difficult to attribute to any specific cause, making detection particularly challenging.

The Common Thread

Both attacks exploit the same fundamental property: agents trust their memory without verifying where it came from. The mechanism differs. The outcome is the same.


Part 3: The Defense

A-MemGuard, published in late 2025, is the most comprehensive defense framework proposed to date. It introduces two core mechanisms.

Consensus-Based Validation

When a query arrives, A-MemGuard retrieves multiple relevant memories and generates parallel reasoning paths from each one. If one reasoning path diverges significantly from the others, it is flagged as anomalous and removed from the validated memory set before the agent uses it.

The insight behind this approach is elegant. A poisoned memory may appear legitimate when examined in isolation, but it will produce reasoning that conflicts with what legitimate memories suggest. Consensus reveals the outlier.

In experiments across three attack scenarios, A-MemGuard reduced attack success rates by over 95% in several configurations. Against direct injection, success rates fell from 100% to 2.13%. Against MINJA-style indirect injection, reductions exceeded 60%.

Dual-Memory Structure

A-MemGuard also introduces a separate lesson memory alongside primary memory. When an anomaly is detected, the flawed reasoning is recorded as a negative lesson rather than discarded. Future queries check the lesson memory first, preventing the agent from repeating the same mistake even if a similar poisoned entry re-enters primary memory.

This breaks the self-reinforcing loop that makes memory poisoning persistent. Rather than simply deleting bad entries, the system learns from them.

What A-MemGuard Cannot Do

Despite these results, A-MemGuard has significant limitations.

It requires direct memory instrumentation. In systems where memory is managed through a black-box API, the framework cannot be applied. Most commercial deployments fall into this category.

It has not been tested on multi-step Agentic RAG pipelines where the agent reasons across multiple retrieval rounds before producing an output.

Most critically, A-MemGuard operates after retrieval. It catches poisoned entries when they are about to be used. It does not catch them when they enter memory in the first place.


Part 4: The Gap Nobody Has Closed

Reading MemoryGraft, MINJA, and A-MemGuard together, a consistent pattern emerges. Each paper acknowledges the same limitation in its future work section.

MemoryGraft points to early-stage detection mechanisms as an open problem. MINJA calls for robust defense against realistic black-box deployments. A-MemGuard explicitly states that early-stage contamination detection at injection time is still missing.

Three independent research groups working on different aspects of the same problem all arrive at the same gap.

![Memory Poisoning Attack Flow]

The distinction matters. Post-retrieval defense catches poisoned entries when they are retrieved for use. Early-stage detection would catch them when they are written into memory, before they ever influence a single reasoning step.

In a multi-step Agentic RAG system, this difference is significant. If a poisoned entry enters memory at step one, post-retrieval defense might catch it when it surfaces at step three. But steps one and two have already been influenced. The reasoning chain has already been shaped by contaminated information.

Early-stage detection would prevent this entirely.


Part 5: What We Still Do Not Know

How Does Poisoning Propagate in Multi-Step Systems?

All three papers focus on single-agent single-step settings. In a multi-step Agentic RAG pipeline where the agent retrieves, reasons, retrieves again, and reasons again across multiple rounds, we do not have a clear picture of how poisoning propagates between steps.

Does a poisoned entry at step one corrupt all subsequent steps? Does it corrupt only topically related steps? Can its influence be isolated? These questions remain unanswered.

Can Injection Be Detected at Write Time?

Current defenses operate at retrieval time. No published work has demonstrated reliable detection at write time, the moment a new entry is being added to memory.

Write-time detection would be more efficient. It would catch contamination before it ever influences reasoning rather than after it has already been retrieved. The challenge is that poisoned entries are designed to look legitimate at write time. Detecting them requires understanding not just the entry itself but its potential influence on future reasoning.

How Do We Evaluate Downstream Damage?

MemoryGraft measured how many poisoned entries were retrieved. A-MemGuard measured attack success rates. Neither work quantifies the actual downstream impact of a successful poisoning event on task quality or system reliability.

Without severity metrics, it is difficult to prioritize defenses or make principled engineering decisions about acceptable risk.

Does Defense Transfer Across Domains?

A-MemGuard was tested on general-purpose agent tasks. Whether consensus-based validation performs equally well in specialized domains where legitimate reasoning paths may naturally diverge more has not been studied.


Conclusion

Memory poisoning is not a theoretical concern. It has been demonstrated with high success rates across multiple attack vectors using nothing more than file access or ordinary conversation. The defenses that exist are meaningful but incomplete.

The field has characterized the attack well. It has proposed initial defenses. What it has not done is close the gap between when poisoning enters a system and when current defenses can detect it.

In multi-step Agentic RAG systems, that gap is where the real damage happens.

Next week I will share results from my own experiment simulating early-stage memory poisoning in a RAG-based recommendation system and testing a detection mechanism before contaminated entries can propagate.


Papers Referenced

  1. Srivastava, S.S. & He, H. (2025). MemoryGraft: Transplanting Memories to Redirect Agent Behavior. arXiv:2512.16962.
  2. MINJA: Injecting Malicious Memories into LLM Agents via Indirect Prompt Injection. arXiv:2503.03704.
  3. A-MemGuard: Defending Against Memory Poisoning Attacks in Agentic AI Systems. arXiv:2510.02373.

This is part of a weekly series on AI/ML research. Each post covers theory, recent work, and open problems.

*Connect on LinkedIn | Follow on Dev.to (https://dev.to/soohan_abbasi)|