OWASP authors analyze MemoryTrap: Claude Code memory and configuration become a persistent prompt injection surface
Memory Is a Feature. It Is Also an Attack Surface
Idan Habler, co-lead of the OWASP ASI06 entry, draws on Cisco's research on Claude Code to explain how an agent's memory and context can become an attack surface. In the vulnerability called MemoryTrap, a routine development workflow can trigger persistent prompt injection: cloning a repository, having the agent assist, approving dependency installation—malicious payloads then enter persistent memory, global hooks configuration, and influence the high-trust instruction layer via the system prompt, thereby affecting model behavior across sessions, across projects, and even after restarts. The author notes that memory files, hook scripts, and local configuration are in fact part of the agent's trusted runtime environment and control plane; once poisoned, the system continues to treat attacker-controlled content as legitimate guidance. This is precisely the risk targeted by ASI06 memory and context poisoning.
Using MemoryTrap as an example, this explains how an agent's memory, hooks, and local configuration can become a persistent prompt injection surface, and provides the fixed version for Claude Code.