about
Real AI Agents, Fake Memories: Fatal Context Manipulation Attacks on Web3 Agents (arxiv.org)
2 points by gnabgib on May 19, 2025 | hide | past | pdf | discuss on HN

In plain words: Attackers can poison the history an AI money-managing agent stores, not just its live instructions, tricking it into sending tokens or breaking blockchain rules. In 150+ blockchain tasks, stored-memory tricks beat prompt tricks; standard prompt defenses barely helped, while retraining cut most attacks.

Abstract · Real AI Agents with Fake Memories: Fatal Context Manipulation Attacks on Web3 Agents

AI agents integrated with Web3 offer autonomy and openness but raise security concerns as they interact with financial protocols and immutable smart contracts. This paper investigates the vulnerabilities of AI agents within blockchain-based financial ecosystems when exposed to adversarial threats in real-world scenarios. We introduce the concept of context manipulation -- a comprehensive attack vector that exploits unprotected context surfaces, including input channels, memory modules, and external data feeds. It expands on traditional prompt injection and reveals a more stealthy and persistent threat: memory injection. Using ElizaOS, a representative decentralized AI agent framework for automated Web3 operations, we showcase that malicious injections into prompts or historical records can trigger unauthorized asset transfers and protocol violations which could be financially devastating in reality. To quantify these risks, we introduce CrAIBench, a Web3-focused benchmark covering 150+ realistic blockchain tasks. such as token transfers, trading, bridges, and cross-chain interactions, and 500+ attack test cases using context manipulation. Our evaluation results confirm that AI models are significantly more vulnerable to memory injection compared to prompt injection. Finally, we evaluate a comprehensive defense roadmap, finding that prompt-injection defenses and detectors only provide limited protection when stored context is corrupted, whereas fine-tuning-based defenses substantially reduce attack success rates while preserving performance on single-step tasks. These results underscore the urgent need for AI agents that are both secure and fiduciarily responsible in blockchain environments.

Atharv Singh Patlan, Peiyao Sheng, S. Ashwin Hebbar, Prateek Mittal, Pramod Viswanath
arXiv:2503.16248 · cs.CR, cs.AI · submitted Mar 20, 2025 · updated Jul 9, 2025
abstract · pdf · html · 19 pages, 14 figures

add comment on HN