数据源与状态仍在导航菜单中
arxiv.org·2026/10/22
LLM服务的持久记忆使prompt injection可被写入并跨会话自动复用,形成memory injection这一新威胁。作者提出覆盖NIST全部攻击目标(可用性、完整性、隐私、滥用)的通用威胁模型,在ChatGPT、Claude、Gemini三大服务上实测,攻击向量涵盖memories、projects、skills、organization instructions与MCP资源。结果显示各平台均会被持久诱导散布虚假信息、生成有害内容或伪装离线;Claude的共享记忆可让单个账户波及整个组织、经Google Drive外传用户prompt,四项目标全部达成,而ChatGPT与Gemini仅隐私攻击未成。作者基于OWASP原则推导默认禁用记忆、过滤、共享记忆限制等缓解措施,发现约半数未被实现——仅Claude默认关闭记忆,却唯一允许从不可信来源创建记忆——并据此质疑持久记忆与安全原则的根本兼容性;攻击数据集与攻击工件已在GitHub开源。
为什么重要 验证了长期记忆从单会话攻击升级为跨会话、跨用户持久化渗透的工程风险,并给出可落地的防御清单适合 LLM 应用安全、记忆/RAG 架构、企业 AI 平台治理的工程与安全人员
近年来生成式人工智能的广泛普及,伴随着 prompt injection 与 jailbreak 攻击的同步增长。这类攻击通过嵌入恶意指令,操纵语言模型绕过其预期行为与运行边界。在传统聊天机器人中,由于状态记忆不会跨对话保留,此类攻击仅限于单个会话内。
然而,现代对话界面的持久记忆功能使攻击得以跨会话传播,形成一种被称为 memory injection(记忆注入)的威胁向量。本研究在主流 LLM-as-a-service 平台上考察了这一新兴漏洞,强调其现实严重性与对策的必要性。已有文献多聚焦于针对特定平台功能的违规行为,而我们提出了一个通用威胁模型。
我们证明,在该模型下,ChatGPT Instant 5.3、Claude Sonnet 4.6 与 Gemini 3 Flash 上可以共同实现全部 NIST 攻击目标。我们还表明,记忆注入可利用多种攻击向量,包括个人记忆、projects、skills、组织指令以及 Model Context Protocol (MCP) 连接的资源。我们的发现显示,所有被评估的服务都可被操纵,即使在全新会话中也会持续传播虚假信息、生成有害内容或模拟离线无响应。
在 Claude 的特定情形下,共享记忆功能使攻击者能够攻陷组织内的多个用户,并外泄用户 prompt。为应对这些漏洞,我们基于所提出的威胁模型与基础网络安全原则推导出防御机制。我们的分析表明,在目标服务中,近一半的缓解措施仍未实现。
数据集与攻击工件可在 https://github.com/PedroBarcha/Memory-injection 获取。
The widespread adoption of generative artificial intelligence in recent years has brought a parallel rise in prompt injection and jailbreak attacks.
By embedding malicious instructions, these exploits manipulate language models to bypass intended behavior and operational boundaries.
In traditional chatbots, such attacks are confined to a single session because state memory is not preserved across conversations.
However, persistent memory features in modern conversational interfaces enable cross-session attack propagation, establishing a threat vector known as memory injection.
This work explores this emerging vulnerability in leading LLM-as-a-service platforms, highlighting its real-world severity and the need for countermeasures.
While existing literature focuses on violations tailored to specific platform features, we present a general threat model.
We demonstrate that all NIST attack goals are collectively achievable across ChatGPT Instant 5.3, Claude Sonnet 4.6, and Gemini 3 Flash under this model.
We also show that memory injections can exploit multiple attack vectors, including personal memories, projects, skills, organization instructions, and Model Context Protocol (MCP)-connected resources.
Our findings reveal that all evaluated services can be manipulated to persistently spread disinformation, generate harmful content, or simulate offline unresponsiveness, even in fresh sessions.
In the particular case of Claude, shared-memory features allow an attacker to compromise multiple users within an organization and also exfiltrate user prompts.
To address these vulnerabilities, we derive defense mechanisms from our proposed threat model and foundational cybersecurity principles.
Our analysis indicates that nearly half of these mitigations remain unimplemented across the target services.
Datasets and attack artifacts are available at https://github.com/PedroBarcha/Memory-injection.



EVIDENCE / METHODS
表格
Claude Sonnet 4.6 是唯一四类目标全中且带共享记忆攻击的平台
| 目标模型 | Misuse | Availability | Integrity | Privacy |
|---|---|---|---|---|
| ChatGPT Instant 5.3 | ✓ | ✓ | ✓ | ✗ |
| Claude Sonnet 4.6 | ✓ | |||
| Gemini 3 Flash | ✓ | ✓ | ✓ | ✗ |
注释 · 表 II 原文:✓=个人记忆成功,+=共享记忆成功,✗=未成功出自 表 II
原版排版与图表 · 手机无法内嵌时可在浏览器打开。PDF 插件内选文不能传给网页助手。