Claude Code Opus 5 Auto Mode enables code execution with up to 80% success
Claude Code Opus 5 Auto Mode can be bypassed to achieve remote code execution with a success rate of up to 80%.
AI/ML Embrace The Red 27 Aug 2026 Attack Prototype evidence
Published as “Breaking Claude Code Opus 5 Auto Mode”
Why it matters
Auto Mode cannot be relied upon as a security boundary; sandboxing and monitoring remain essential.
Summary
The author crafted a multi-step prompt injection chain that forces Claude Code Opus 5 Auto Mode to fetch a malicious ZIP archive, write a Python decoder, and trigger module shadowing via a poisoned struct.py, leading to remote code execution. In small lab trials the attack succeeded in 3 out of 5 runs for a simple C2 chain (60%) and 4 out of 5 runs for a variant that also writes files (80%). The evidence is limited to a handful of manual test runs and a video demo, with no large-scale telemetry.
What they found 2
- Attack success rates reached up to 80% in the author's limited tests.
“I got attack success rates up to 80% using a small sample size.”
- Auto Mode sometimes prevented the attacker’s cleanup command.
“Auto Mode denied the cleanup command.”
Caveats 5
- Anthropic’s third-party evaluation of 72 indirect prompt-injection scenarios reported 0.00% success for Opus 5 Auto Mode.
- Anthropic’s security team stated the behavior is working as designed and that Auto Mode is a best-effort classifier, not a security guarantee.
- Results are based on a small sample size and may not generalize to broader deployments.
- The attack chain was custom-crafted and not part of the benchmark used by Anthropic.
- Success rates improved as payloads were iterated with the help of Codex, indicating potential bias toward the author’s expertise.
What’s new here 4
- Demonstrates a targeted prompt-injection chain that bypasses the Auto Mode safety classifier.
- Achieves remote code execution via Python module shadowing inside a downloaded ZIP archive.
- Reports 60-80% attack success rates on a small sample of test runs.
- Shows Auto Mode can block cleanup commands after malware starts, highlighting classifier limitations.