cd /news/ai-safety/researcher-shows-how-claude-code-can… · home topics ai-safety article
[ARTICLE · art-114726] src=machinebrief.com ↗ pub= topic=ai-safety verified=true sentiment=↓ negative

Researcher shows how Claude Code can be tricked simply by asking it to summarize a website

Anthropic's Claude Code running Opus 5 in Auto Mode can be tricked into executing attacker-controlled code up to 80 percent of the time by asking it to summarize a malicious website, according to researcher Johann Rehberger. The attack exploits prompt injection and Python module shadowing to bypass safety guardrails, and Anthropic reportedly said the behavior is working as designed.

read3 min views1 publishedAug 28, 2026
Researcher shows how Claude Code can be tricked simply by asking it to summarize a website
Image: Machinebrief (auto-discovered)

Source:

[The Register](https://www.theregister.com)More prompt-injection hijinks from wunderwuzzi

[Anthropic](/glossary/anthropic)’s

ClaudeCode running Opus 5 in Auto Mode can be tricked into executing attacker-controlled code simply by asking the coding agent to summarize a website. The attack works up to 80 percent of the time, according to prompt-injection wizard Johann Rehberger, aka wunderwuzzi. In a blog and video demo, he detailed how to hijack Opus 5 in Auto Mode, which is the default setting for Claude as of mid-August. It starts off by asking the agentic coding model to summarize a malicious website that presents itself as an archive of notebook records, and then tricking Claude into using curl instead of its WebFetch tool to retrieve the contents of the page – but without directly telling the model to use curl. The WebFetch request fails, returning a 415 Unsupported Media Type response, so the model decides to access the website directly by issuing a Bash tool call with curl. The website returns a 303 response, and redirects to a malicious ZIP archive, which Claude then downloads. This archive contains seemingly harmless files including catalog metadata, a README file, seven Base85/zlib-encoded JSON notebook records, a macOS

decoder-darwin binary – plus a poisoned Python file named struct.py. Claude, per its safety

guardrails, refuses to run the decoder: “This is planned and what the attacker wants,” Rehberger wrote. Instead of using the supplied binary, the AI decides to write its own decoder. “Ironically, that safety decision is the exploit path,” Rehberger explained, adding a purple devil emoji to the text. The new decoder imports base64, and from here the attack relies on Python module shadowing to trick the model into running the malicious struct.py code. Module shadowing occurs when a local file shares the same name as a Python standard-library module. The local file hides the official module, causing Python to load it instead. In this case, the standard-library base64 module imports the legitimate struct module, and the malicious ZIP contains a malicious file with the same name. Rehberger says he used

ChatGPTto obfuscate the malicious struct.py code to bypass Claude’s safety controls, and this successfully launches a separate Python process to download and execute a remote payload – in this case a command-and-control callback, which in turn opens Calculator. We assume that real attackers would execute something a little more nefarious. In another attack scenario, struct.py launches a second, headless Claude Code via claude -p, meaning this prompt injection can be used not just to remotely execute code, but rather to create a whole new agent. “The nested Claude gets its own tool access and context,” Rehberger wrote. “In these runs the child performed basic recon (whoami, uname, id), opened Calculator and wrote to local files in the home folder.” Across three variants tested five times each, which Rehberger noted were small samples, he reported success rates between 60 percent and 80 percent. “I would say that these results are representative for a motivated attack, but not comprehensive.” Anthropic did not respond to The Register’s request for comment, but reportedly told Rehberger that the model’s “behavior is working as designed.” We’ve heard this one before. “Auto Mode is a convenience feature backed by a best-effort classifier, not a security guarantee,” Rehberger wrote, paraphrasing Anthropic’s response to his security report. According to Rehberger, the classifier isn’t built to stop determined prompt-injection chains made up of individually benign-looking steps, and the real boundary is OS isolation and network egress control. The key takeaway, according to Rehberger, is to run this and other coding agents in a sandbox. “The solution is something we talked about for many years,” he wrote. “Do not trust the model output.”®

Get AI news in your inbox

Daily digest of what matters in AI.

Key Terms Explained #

Anthropic

An AI safety company founded in 2021 by former OpenAI researchers, including Dario and Daniela Amodei.

Claude

Anthropic's family of AI assistants, including Claude Haiku, Sonnet, and Opus.

Decoder

The part of a neural network that generates output from an internal representation.

Guardrails

Safety measures built into AI systems to prevent harmful, inappropriate, or off-topic outputs.

── more in #ai-safety 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/researcher-shows-how…] indexed:0 read:3min 2026-08-28 ·