When the answer is the administration: permission replies that rewrite coding agent policiesWhen Answering Is Administering: Permission Replies That Rewrite Coding-Agent Policy
Quick read
Based on the paper's full text (AI-generated); refer to the original
Researchers from institutions including the University of Technology Sydney and the National University of Singapore show in a paper that in coding agents, the party trusted only to answer permission prompts can, through policy updates attached to its replies, rewrite the operator's rules, causing safety guarantees from per-decision checks to fail over the course of a run. On Claude Code, when a remote service with no file access approves an unrelated command while attaching a deny rule that removes protection for project secrets, the agent then reads the secrets in the current and subsequent sessions, and the vendor's strict sandbox does not stop it; version 2.1.327, the latest at the time of writing, is still affected. The root cause is that at runtime only updates that add or replace allow rules are checked; deny deletions take effect without being checked, and rules leave no record of their author; among 70 forwarding tools examined, about 7% (including Anthropic's Remote Control) forward such updates.
- Coding agents allow plugins and remote services to answer permission prompts on the operator's behalf, and Claude Code documentation states that such answers cannot override deny rules. The authors point out that this guarantee holds only for a single decision and fails over a whole run: one answer can rewrite the policy on which all subsequent answers are based.
- The authors analyze the code path in the Claude Code binary that handles answer updates and construct an attack: the answer carries an update that deletes deny rules, which the runtime writes into settings. They then build a formal model of policy updates and filters, derive tight bounds for safe delegation according to whether rule authorship is recorded, validate the predictions on thirteen permission designs across ten agent systems, and finally implement a validator on the shared update step.
- The attack succeeds on four answer paths, with scripts and real models, and under strict sandboxing; about 7% of deployed relays (including the vendor's Remote Control) forward such updates; cross-system predictions agree with all thirteen designs, including four preregistered predictions; the validator preserves operator restrictions in all attack runs and in 20,000 random runs, affecting only two of 2,227 marketplace plugins.
- Experiments run on Linux; the sandbox relies on bubblewrap, and the macOS Seatbelt sandbox has not yet been retested; the validator covers only updates carried by answers, and state read by subsequent authorization such as hook configuration, MCP settings, and instruction files is a natural extension direction; exact coverage checking of path rules is coNP-hard and requires sound approximation.
The paper presents an attack in which permission replies rewrite operator policies and gives a tight bound for safe delegation, which teams deploying coding agents can use to check their own permission update paths.
Related events and news
1 events · 0 news mentions
- This event's paper
研究:权限答复可改写编码智能体规则