Translation in progress Some entries still include text in the original language.
BackSource OWASP GenAI Security Project
Idan Habler, ASI Core Team and ASI06 Entry Lead, Cisco - Senior Tech Lead - AI Security Researcher
Indexed by this site 2026-10-01 03:12 12 days ago
Originally published May 14
Selected 2026-10-01 03:13
Category Attacks OWASP GenAI Security Project · Idan Habler, ASI Core Team and ASI06 Entry Lead, Cisco - Senior Tech Lead - AI Security Researcher · Indexed by this site 2026-10-01 03:12 · Originally publishedMay 14 SelectedAttention50
OWASP 作者解析 MemoryTrap:Claude Code 记忆与配置成为持久提示注入面 Memory Is a Feature. It Is Also an Attack Surface
AI summary
OWASP ASI06 条目联合负责人 Idan Habler 结合 Cisco 对 Claude Code 的研究,说明 Agent 的记忆与上下文如何成为攻击面。在被称为 MemoryTrap 的漏洞中,常规开发流程即可触发持久提示注入:克隆仓库、让 Agent 协助、批准依赖安装,恶意载荷便进入持久记忆、全局 hooks 配置,并通过 system prompt 影响高信任指令层,从而跨会话、跨项目乃至重启后持续影响模型行为。作者指出,记忆文件、hook 脚本和本地配置实际属于 Agent 的受信运行环境与控制面,一旦被投毒,系统会继续把攻击者控制的内容当作合法指引,这正是 ASI06 记忆与上下文投毒所针对的风险。
Why it was selected
以 MemoryTrap 为例说明 Agent 的记忆、hooks 与本地配置如何成为持久化提示注入面,并给出 Claude Code 的修复版本。
Read original genai.owasp.org Why it was selected SelectedAttention50
Attention 0–100: content value contributes up to 70 and circulation up to 30; circulation decays over time. How it was rated
以 MemoryTrap 为例说明 Agent 的记忆、hooks 与本地配置如何成为持久化提示注入面,并给出 Claude Code 的修复版本。