Skip to content
Safety · Sep 13, 2026

Researcher demonstrates prompt injection bypass in Claude Code Opus 5 Auto Mode

Johann Rehberger found an attack that bypasses Auto Mode's defenses 80% of the time, including cases where the safety mechanism blocked cleanup commands.

Trust79
HypeLow hype

1 source · cross-referenced

ShareXLinkedInEmail
TL;DR
  • Johann Rehberger, a prominent prompt injection researcher, demonstrated an attack against Anthropic's Claude Code Opus 5 Auto Mode that bypasses its defenses in 80% of attempts.
  • The attack tricks the agent into downloading and executing a malicious zip archive, including a local struct.py file that compromises the system.
  • In some cases, Auto Mode prevented the agent from terminating the malicious process, blocking cleanup commands even after detecting compromise.

Johann Rehberger, a leading prompt injection researcher, identified and demonstrated an attack against Anthropic’s Claude Code Opus 5 Auto Mode that bypasses its defenses in 80% of attempts. The attack works by tricking the coding agent into downloading and uncompressing a zip archive, then executing code that imports the base64 module. Crucially, the archive contains a local struct.py file that is executed during the import, enabling a compromise of the agent’s runtime environment.

In several observed runs, the agent detected the compromise and attempted to terminate the malicious process. However, Auto Mode blocked these cleanup commands, preventing the agent from stopping the harmful execution. This demonstrates a failure mode where the safety mechanism itself becomes part of the attack chain: the classifier allowed the creation of the malware process, but then blocked the command intended to stop it.

The findings suggest that relying solely on Auto Mode for protection against prompt injection in autonomous coding agents is insufficient. Rehberger recommends running unattended coding agents in isolated environments such as containers, VMs, or OS sandboxes, restricting network egress, monitoring agent activity, and avoiding exposure of sensitive directories or credentials to the agent runtime.

Sources
  1. 01Simon Willison’s Weblog — Breaking Claude Code Opus 5 Auto Mode
Also on Safety

Stories may contain errors. Dispatch is assembled with AI assistance and curated by human editors; despite the trust-score filter, mistakes happen. We correct publicly — every article links to its revision history. Nothing here is financial, legal, or medical advice. Verify before relying on any claim.

© 2026 Dispatch. No ads. No sponsorships. No paid placement. Reader-supported via Ko-fi.

Built by a person who cares about honest AI news.