Skip to content
Agentsstrong signalverified

The classifier let the malware start and then refused to let Claude kill it

Johann Rehberger chained benign-looking steps until Claude Code wrote its own loader for an attacker's Python module. Three variants succeeded in three, three and four runs out of five. In some runs Claude noticed the compromise and tried to stop the process, and Auto Mode denied that command. Anthropic closed the report as informative.

By Redakcija WebAiRadarPublished 3 min readwritten by a model
Image: Embrace The Red

Source

Breaking Claude Code Opus 5 and Auto Mode

Embrace The Red · Original published August 26, 2026

Security researcher Johann Rehberger published an attack against Claude Code Opus 5 running in Auto Mode on August 26. Nothing in the chain is a single forbidden action. Every step looks reasonable on its own, which is the point: Auto Mode judges steps, and the attack is built out of steps that individually pass.

How the chain runs

The server answers Claude's initial request with HTTP 415, which nudges it off the WebFetch tool and onto curl. What arrives through the redirect is a zip archive holding encoded records, a decoder binary, and a file named struct.py.

Claude then refuses to run the supplied decoder-darwin binary, on safety grounds. That refusal is the hinge of the whole attack. Rather than stop, Claude writes its own Python decoder and runs it inside the extracted directory, and that script imports base64.

Python resolves imports from the current directory first. base64 imports struct, so Python loads the attacker's struct.py out of the archive instead of the one in the standard library. The poisoned module runs obfuscated code at import time, spawns a child process, and that child downloads and executes a native payload which calls home and opens Calculator to prove it ran.

The part worth reading twice

Rehberger tested three variants, five runs each: the command-and-control chain succeeded three times, a variant using a Claude subprocess for reconnaissance three times, and a variant using a Claude subprocess for file writes four times.

The finding that matters is not the rate. In some runs Claude worked out that it had been compromised and issued a command to terminate the malware process, and Auto Mode blocked that command. The safety layer permitted the process to start and then stood between the agent and the cleanup.

  • The classifier reads actions, and no action here is forbidden on its own.
  • The dangerous step was written by Claude, not supplied by the attacker, so there was nothing malicious to recognize.
  • Blocking is symmetric: a layer that stops harmful commands also stops remedial ones, because it cannot tell which is which.

What Anthropic said

Rehberger reported it to Anthropic's model bug bounty address and says he had no reply through that channel before publishing. The security team closed the report as informative, with a position that is worth quoting rather than paraphrasing: Auto Mode is a convenience feature backed by a best-effort classifier, not a security guarantee. Determined prompt injection chains built from benign-looking steps are not what the classifier is meant to stop, and the real boundary is operating system isolation and network egress control.

That is a coherent answer and it is also a reframing of what a default is for. Auto Mode is the default for Pro, Max and Team plans, and a default that most people will never read the documentation for is, in practice, whatever it appears to be. Anyone running a coding agent against untrusted content should be doing it in a container or a virtual machine, with restricted egress and credentials kept out of reach, which is what Rehberger recommends and what Anthropic points at.

„The safety mechanism itself can become part of the failure. The classifier allowed the creation of the malware process, but then it blocked the command intended to stop it!“
Johann Rehberger, Embrace The Red

Sources

BrandsClaude

Related

OPENCLAW 2026.10.232,768characters, and past that a key could slip thr
Agentsmedium signal

OpenClaw 2026.10.2 stops long tool output from slipping credentials past redaction

A bug in OpenClaw's secret masking let a credential through whenever it straddled the boundary between two slices of a long text. The fix ships in 2026.10.2 along with repaired updates from 2026.10.1 and a new compaction default for OpenAI and Anthropic API keys.

OpenClawverified

The OpenClaw web interface with a conversation on the left and the Bits & Bolts reference MCP app open beside it, showing a 3D keycap model and an Attach view + note button.
Agentsmedium signal

OpenClaw 2026.10.1 lets agents search installed skills and changes how sessions message each other

OpenClaw released version 2026.10.1 on October 10, 2026, its first stable release since 2026.9.7. Agents can now search the skills installed on a machine and read only the one a task needs, instead of carrying the whole library in the prompt. Opt-in MCP Apps run beside chat, and full backups can go to an external drive or Cloudflare R2. Three changes can break existing setups: session-to-session messaging, the old required argument, and Workboard data stored before July 2026.

OpenClawverified

CLAUDE CODE2.1.294hooks written as instructions now block what t
Agentsmedium signal

Claude Code 2.1.294 fixes prompt hooks that let through the actions they were written to block

Anthropic released Claude Code 2.1.294 on October 8, 2026. It fixes prompt and agent hooks phrased as instructions, which could allow exactly the actions they were meant to stop. Version 2.1.295 followed the same day with an onFailure setting that makes a crashed or timed-out command or HTTP hook block the action. Releases 2.1.292 and 2.1.293 from earlier in the week closed several permission and sandbox gaps.

Claude Code Releases (GitHub)verified