REVSOCRESEARCH DIVISIONWhite Paper · May 2026
AI SecurityStateful AgentsRAG SecurityMemory Poisoning

MemShield Research

Mitigating persistent memory poisoning in stateful autonomous AI agents

A three-layer defensive middleware architecture for protecting long-term agent memory through provenance verification, trust-aware retrieval decay, and semantic contradiction detection.

Author
Nickhil Earla
Publisher
RevSoc Research Division
Length
23 pages

77.0%

MemoryGraft baseline attack success

59.1%

eTAMP baseline attack success

0.1%

Attack success with MemShield

1.0%

False-positive rate

The research problem

Long-term memory creates a persistent attack surface.

Stateful agents retain instructions, preferences, and operational context across sessions. Standard retrieval systems rank this memory primarily by semantic relevance, without natively verifying who wrote it, how trustworthy it is, or whether it conflicts with established rules.

The paper formalizes Persistent Memory Poisoning as a distinct threat category and evaluates two attack vectors: MemoryGraft, a targeted memory injection technique, and eTAMP, which introduces malicious instructions through documents, websites, or tool outputs an agent processes during normal work.

LAYER 01

Cryptographic provenance

HMAC-signed provenance tokens separate authenticated instructions from untrusted external content before memory commit.

LAYER 02

Trust-weighted retrieval

Retrieval priority combines semantic similarity, source trust, and temporal decay so unverified content loses influence over time.

LAYER 03

Semantic contradiction detection

An isolated evaluator checks candidate memories against core directive anchors and quarantines conflicting instructions.

What the paper includes

  • A threat taxonomy for persistent memory poisoning in RAG-based agents
  • Technical definitions of the MemoryGraft and eTAMP attack vectors
  • The full three-layer MemShield middleware architecture
  • Monte Carlo simulation design, parameters, results, and edge cases
  • Enterprise deployment recommendations and a mathematical derivation of trust decay

Citation

Earla, N. (2026). MemShield: Mitigating Persistent Memory Poisoning in Stateful Autonomous AI Agents. RevSoc Research Division.

Research correspondence: research@revsoc.ai

Evaluation note: Reported figures were generated using the documented Monte Carlo evaluation harness included with the research materials. Results may vary across model and deployment configurations.

© 2026 RevSoc Research Division. Published for informational and research purposes.