Breaking Claude Code Opus 5 Auto Mode(embracethered.com)
394 points by Recursing 10 days ago | 119 comments
tl;dr: A researcher achieved 60-80% attack success rates against Claude Code Opus 5's Auto Mode by hosting a website that redirects Claude to a ZIP archive containing a malicious `struct.py`; Claude refuses to run the included binary decoder but writes its own Python decoder and executes it inside the attacker's directory, triggering Python module shadowing when `base64` is imported, leading to RCE and C2 callback. Anthropic closed the report as "working as designed," contradicting their earlier marketing of a 0.00% prompt injection rate and reinforcing that Auto Mode is not a substitute for OS-level sandboxing.
HN Discussion:
  • Python's silent module shadowing is surprising and poorly designed behavior
  • Sandboxing agents is essential given these risks, and containers make it practical
  • ~This isn't really prompt injection but rather a targeted trojan exploiting Claude's predictable habits
  • Sandboxing real dev environments is impractical, leaving users stuck with 'allow everything'
  • Anthropic's misleading Auto Mode marketing warrants legal/class action consequences