Researchers locally reproduced the Claude Code Auto Mode attack chain disclosed by Rehberger
Claude Code Auto Mode 远程代码执行攻击链复现与分析
The author locally reproduced the Claude Code Opus 5 Auto Mode attack chain disclosed by Johann Rehberger in August 2026: the user only asks for a summary of a website, and the content returned by the webpage can drive the agent to execute arbitrary code, without a traditional software vulnerability. Rehberger conducted targeted tests against Anthropic's claimed 0.00% injection success rate, and measured an attack success rate between 60%–80% (multiple rounds, small samples). The author reproduced it successfully on Claude Code with deepseek-v4-pro and on zcode with glm5.3. The key mechanism is module shadowing: after the model refuses to run the binary decoy inside the compressed archive, it writes its own decoder; when run in the extraction directory, importing base64 also loads a malicious struct.py, and the decoding result remains correct as usual and is hard to notice. The author argues that this chain does not rely on deceiving the model, but on laying out the path of least resistance for each step, and recommends running unsupervised agents in a sandbox and not starting the interpreter in the extraction directory.
The author locally reproduced this attack chain and provides a defense checklist, noting that agent safety evaluation should examine where the decision sequence leads under an environment arranged by the attacker.