研究者发现针对 Claude Code Opus 5 自动模式的高成功率攻击

Simon Willison 博客·2026-08-28 06:50·6小时前·Simon Willison
AI 导读

安全研究员 Johann Rehberger 发现一种针对 Claude Code 自动模式的攻击,通过诱骗其下载并解压 zip 压缩包,进而执行本地恶意代码,据称成功率高达 80%。

Simon Willison 博客
55AI 编辑部评分,满分 100

研究者发现针对 Claude Code Opus 5 自动模式的高成功率攻击

2026-08-28 06:50· 6小时前· Simon Willison
AI 导读

安全研究员 Johann Rehberger 发现一种针对 Claude Code 自动模式的攻击,通过诱骗其下载并解压 zip 压缩包,进而执行本地恶意代码,据称成功率高达 80%。

Simon Willison’s Weblog

27th August 2026 - Link Blog

Breaking Claude Code Opus 5 Auto Mode. Anthropic are putting a great deal of faith in Claude Code's auto mode for protecting their coding agent users against prompt injection attacks. They recently made that the default and have made bold claims about its effectiveness.

Johann Rehberger is one of the most credible prompt injection researchers active today. He found an attack against auto mode which he claims works 80% of the time, by tricking Claude Code into downloading and uncompressing a zip archive, then executing code that imports base64 without noticing that this will import and execute a local struct.py file extracted from the archive.

In a few cases auto mode directly prevented the agent from preventing harmful code from continuing to execute!

In a few runs Claude tried to terminate the malware process once it noticed the compromise, but Auto Mode denied the cleanup command.

Claude detects the compromise, but Auto Mode blocks its cleanup command

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!

I agree with Johann's conclusion here: the only safe way to run agents if there's any risk of attracting the attention of an adversarial attack is with a sandbox:

  • Run unattended coding agents in a container, VM or OS sandbox.
  • Restrict network egress.
  • Monitor your agents.
  • Do not expose home directories, SSH keys, cloud credentials,… to the agent runtime. [...]

27th August 2026

来源:Simon Willison 博客· simonwillison.net