压缩上下文时,大模型代理会误把分散的良性片段连成恶意指令。
Safe to Check, Unsafe to Use: Relinking at the Compression Boundary of LLM Agents
- 将恶意指令拆成多个良性片段,压缩后自动重组为完整攻击指令。
- 在4个基准上攻击成功率86.9%,远超对照组17.0%。
- 提出工具Relink和防御方法KBRA,可有效防范此类漏洞。
基于摘要的提示压缩被越来越多的大模型代理用于缩短长而分散的上下文,但这种做法改变了安全边界:过滤器检查压缩前的提示,而后台系统则执行新生成的压缩后上下文。我们识别出一种名为重链接(relinking)的压缩边界漏洞,其中压缩器充当被误导的代理人,将分散的、本地无害的片段汇总成完整的恶意指令。与提示注入不同,重链接无需在原始上下文中放置显式的恶意内容。我们发现重链接源于摘要机制本身:注意力机制使分离片段共同可用,预训练使兼容片段看似合理可连接,后训练则偏好紧凑且可执行的摘要。我们形式化了攻击者诱导的重链接为对抗性重链接,并提出了Relink——一个基于领域特定语言的自动化工具,能将恶意载荷拆分为良性片段,同时确保完整载荷在压缩前不存在。在四个长上下文代理基准测试中,Relink实现86.9%的重链接率和后端执行率,而干净拆分对照组仅为17.0%。现有防御措施无法可靠检测对抗性重链接;我们的KBRA防御将残余后端执行率降至0.0%。
原文摘要 · Abstract (English)
Summarization-based prompt compression is increasingly used by LLM agents to shorten long, distributed contexts, but it shifts the security boundary: filters inspect the pre-compression prompt while the backend acts on a newly generated compressed context. We identify relinking, a compression-boundary vulnerability where the compressor behaves as a confused deputy, summarizing distributed, locally benign fragments into a complete malicious instruction. Unlike prompt injection, relinking need not place an explicitly malicious payload in the source context. We show that relinking arises from summarization itself: attention makes separated fragments jointly available, pre-training makes compatible fragments plausible to connect, and post-training favors compact backend-actionable summaries. We formalize the attacker-induced form as adversarial relinking and present Relink, an automated DSL-based tool that splits malicious payloads into benign fragments while keeping the complete payload absent before compression. Across four long-context agent benchmarks, Relink achieves 86.9% Relink Rate and Backend Action Rate versus 17.0% for clean-split controls. Existing defenses fail to reliably capture adversarial relinking; our KBRA defense reduces residual Backend Action Rate to 0.0%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。