arXiv:2605.02187cs.CRcs.AI2026-05

88%主流大模型代理存在响应篡改漏洞,新防御方案可零误报拦截攻击

Rewriting the Response Path: Silent Tampering and Provider-Signed Defense in BYOK LLM Agents

  • 利用用户密钥配置的中继劫持明文响应,仅改一个字段即能绕过验证
  • 99.7%恶意代码在公开测试中通过却悄悄破坏安全机制,五模型均被成功误导
  • 提出sign-c防御机制,本地校验+服务端签名,0.0167%延迟开销下全拦截

LLM代理将模型输出转化为实际操作,开发者通常依赖测试结果和执行日志作为可信证据。我们发现,在约88%主流代理采用的BYOK(自带密钥)配置中存在响应路径完整性漏洞:由于流量经用户授权中继传输,中继可在对齐后、执行前修改明文响应内容,而不会破坏加密。最小攻击仅需重写一个执行承载字段,并用用户密钥重新生成其余响应,保持模型风格不变。实验显示虚假绿灯现象——恶意代码修改通过公开测试但悄然绕过安全检查。在APPS数据集上,99.7%通过测试的解决方案实际上行为降级且无开发者可见警告。在SWE-bench、AgentDojo和ASB上对五个前沿模型的测试表明,单字段重写即可引导代理完成虚假任务。为此提出sign-c方案,由服务器端认证执行承载字段与外发查询,本地沙盒在执行前验证,加密保障机密性。该防御实现所有篡改响应零误拒,仅引入0.0167%延迟开销。

原文摘要 · Abstract (English)

LLM agents convert model outputs into consequential actions, including communications, code changes, and financial transactions. Developers often trust evidence such as test results and execution logs. We identify a response path integrity gap in Bring Your Own Key configurations used by roughly 88 percent of mainstream agents. Because traffic passes through a user-authorized relay, the relay can modify plaintext LLM responses after alignment but before execution without breaking encryption. A minimal attack rewrites one execution bearing field and regenerates the remaining response using the user key while preserving the model style. Experiments reveal false green verification, where malicious code modifications pass public tests while silently defeating security checks. On APPS, 99.7 percent of publicly passing solutions retained downgraded behavior without developer-visible warnings. Tests on SWE bench, AgentDojo, and ASB across five frontier models show that single-field rewriting can redirect agents while preserving apparent task completion. We propose sign-c, a server-side scheme that authenticates execution bearing fields and outgoing queries. A local shim verifies them before action, while encryption protects confidentiality. The defense rejected all tampered responses with zero false rejections and only 0.0167 percent latency overhead.

大模型安全响应篡改BYOK防御机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。