跳到正文
arXiv (AI + Vision + Imaging)· Zeming Fei, Hongming Fei, Jingwen Chen, Xiaoyang Wang, Prosanta Gope, Biplab Sikdar, Ying Zhang·· 1 天前AI 评分12

Claude Code 权限应答漏洞:一次批准可改写后续全部策略

When Answering Is Administering: Permission Replies That Rewrite Coding-Agent Policy

AI 导读

研究发现 Claude Code 的权限应答可改写后续所有应答所依据的策略:一个无法访问操作者文件的远程服务在批准无关命令时附带删除保护项目密钥的 deny 规则,代理随后在该会话及下一会话中读取密钥,即使在厂商严格沙箱内也如此。

正文 · 原文

arXiv:2611.32195v1 Announce Type: cross Abstract: Coding agents let plugins and remote services answer permission prompts, and Claude Code documents that such an answer cannot override the operator's deny rules. However, we show that this guarantee, checked one decision at a time, fails over a whole run, because an answer to one permission prompt can rewrite the policy that every later answer is checked against. For example, a remote service with no access to the operator's files approves an unrelated command and attaches an update that deletes the deny rule protecting the project's secrets. The agent then reads the secrets in that session and the next, even inside the vendor's strict sandbox. The root cause is that Claude Code checks only updates that add or replace allow rules. Relays that forward such deletions already exist, including the vendor's own Remote Control. In effect, the right to answer a prompt has become the right to administer the policy. Worse, the deletion leaves the same records as a local edit by the operator, so Claude Code cannot tell who wrote a rule. More generally, what a runtime records decides what it can safely delegate. A runtime that cannot tell who wrote a rule can accept only updates that keep every currently denied call denied, whereas, to protect every party's restrictions, a runtime that records who wrote each rule can let each party remove only the restrictions proven to be its own. We prove that these two bounds are tight. They correctly predict whether the operator's restrictions survive in all thirteen permission designs across ten agent systems, including predictions we wrote down before running Codex, Gemini CLI, opencode, and Goose. Enforcing the bounds at the shared update step blocks the attack. A survey of 2,227 fetched marketplace plugins finds only two that send policy updates.

来源:arXiv (AI + Vision + Imaging) · arxiv.org