From Approval to Abuse: Privilege Escalation Attacks on Harness-Protected Coding Agents
Coding agents run inside a harness that stops anything leaving the sandbox and asks you to approve it, and because the prompts pile up you can approve a reusable rule instead — every command starting with python, or curl, then runs unasked. This work shows repository content the agent reads can shape which rule it proposes: a planted failing script and a README pointing at it got the agent to request a plausible but over-broad rule in 58 of 100 runs across two harnesses and four models, against 32 for simply asking and 0 for the benign control, and once approved the same setup silently finished its real goal — reading private files, sending data out, deleting files — in 47 of 58 eligible cases. The ablation is the part to keep: narrative persuasion in the repository text barely worked (1 of 3 runs), while making the blocked command the only route past a gate the task had to clear worked 3 times out of 3. Read an approval prompt as a policy edit, not a yes to one command: scope rules to exact commands rather than prefixes, and fix the ceiling of what can ever be granted before the agent reads anything untrusted.