ContextLeak 论文显示,恶意工具无需读取记忆或文件,只要让模型把上下文当作工具参数传出即可窃取数据。该方法用强化学习训练攻击 LLM 生成工具名和描述,在默认评估中针对用户提示词和对话历史的攻击选中率分别为 92% 和 89%,一旦被选中提示词几乎可完整重建。
A malicious agent tool can steal context without reading memory or files at all: it can convince the model to send the context as tool arguments.
This paper shows that tool descriptions can become a data-exfiltration channel.
ContextLeak trains an attack LLM with reinforcement learning to generate tool names and descriptions that make an agent choose the malicious tool and include sensitive runtime data such as the user prompt, conversation history, or installed tool list.
On the paper’s default evaluation, it gets the malicious tool selected for 92% of user-prompt attacks and 89% of conversation-history attacks, with near-perfect prompt reconstruction once selected.
The attack transfers across backend models, and in a Claude Code test with Claude Sonnet 4.6, a version trained only against an open-source proxy was selected in 22 of 100 cases; when selected, extraction was close to complete.
– arxiv. org/abs/2608.27800
Title: "ContextLeak: Exfiltrating LLM Agent Context via Malicious Tools"
来源:@rohanpaul_ai · x.com