클로드 코드 오푸스 5의 자동 모드가 단순한 웹사이트 요약 요청만으로 악성코드를 실행하도록 유도됐습니다.
보안 연구자 요한 레베르거가 자신의 연구 블로그 '임브레이스 더 레드'를 통해 공개한 사례입니다. 제한적 실험에서 공격 성공률은 60%에서 80%에 달했습니다.
앤트로픽이 고정된 시나리오 테스트에서 밝힌 프롬프트 인젝션 성공률은 0%였습니다. 같은 기능을 두고 두 숫자가 갈립니다.
■ 평범한 지시에서 시작됐다
시작은 웹사이트를 요약해달라는 요청이었습니다.
공격자가 통제하는 사이트는 노트북 기록 아카이브를 표방했습니다. 클로드가 자체 웹 조회 도구로 접근하자 서버는 오류를 반환했고, 클로드는 대신 셸 명령으로 사이트를 직접 가져왔습니다. 그 요청은 압축파일로 이어졌습니다.
압축파일 안에는 정상적으로 보이는 자료와 함께 파이썬 파일 하나가 섞여 있었습니다.
■ 거부한 판단이 발판이 됐다
여기서 클로드는 안전한 선택을 했습니다. 압축파일에 들어 있던 실행 파일을 직접 돌리는 것을 거부한 것입니다.
그러면 무엇이 문제였을까요? 거부한 뒤의 우회 경로였습니다. 클로드는 대신 자체적으로 파이썬 해독 코드를 작성해 표준 모듈을 불러왔습니다. 문제는 그 코드를 압축을 푼 디렉터리 안에서 실행했다는 점입니다.
파이썬은 모듈을 불러올 때 현재 디렉터리를 먼저 찾습니다. 공격자가 표준 라이브러리와 같은 이름으로 심어둔 파일이 진짜 모듈 자리를 대신 차지했고, 클로드가 표준 모듈을 부르는 과정에서 그 파일이 함께 실행됐습니다.
해독 자체는 정상적으로 작동했습니다. 클로드는 제대로 풀린 결과를 받았고, 숨겨진 코드가 이미 실행됐다는 사실을 즉시 알아차리지 못했습니다.
■ 안전장치가 방어를 막았다
더 우려스러운 대목은 그다음입니다. 자동 모드의 안전 분류기가 오히려 방어를 방해한 경우가 있었습니다.
개발자 사이먼 윌리슨은 일부 실행에서 클로드가 침해를 인지한 뒤 악성 프로세스를 종료하려 했지만, 자동 모드가 그 정리 명령을 거부했다고 전했습니다. 분류기가 악성 프로세스의 생성은 허용하면서 그것을 멈추려는 명령은 차단한 것입니다.
임브레이스 더 레드는 자동 모드를 보안 경계선으로 취급해서는 안 된다고 결론지었습니다. 분류기는 명령 하나의 위험을 판단하지만, 압축파일과 로컬 임포트 경로, 하위 프로세스, 네트워크 요청에 숨은 위험까지는 보지 못할 수 있다는 것입니다.
■ 성공률 60%와 80%
실험은 소규모 표본으로 진행됐습니다. 파이썬 기반 공격 체인은 5회 중 3회, 클로드 코드를 재귀적으로 실행하는 방식도 5회 중 3회 성공했습니다. 작업 공간 밖에 파일을 기록하는 방식은 5회 중 4회까지 올라갔습니다.
표본이 작다는 점은 연구자도 밝혔습니다. 다만 방향은 분명합니다. 고정된 시나리오에서 0%, 공격자가 상황을 설계했을 때 60~80%.
자동 모드는 모든 명령마다 사용자 승인을 요구하는 대신 안전 분류기로 도구 호출을 검토해 승인 피로를 줄이는 기능입니다. 앤트로픽은 이 기능이 승인 절차를 완전히 생략하는 것보다는 안전하다고 설명하면서도, 샌드박스나 운영체제 수준의 보안 통제를 대체하는 장치는 아니라고 선을 그어왔습니다.
■ 쓰는 쪽이 할 수 있는 것
그러면 지금 무엇을 해야 할까요? 임브레이스 더 레드의 권고는 격리입니다.
자율 코딩 에이전트를 컨테이너나 가상머신, 전용 테스트 시스템 같은 격리된 환경에서 돌리고, 네트워크 접근을 제한하며, 민감한 인증정보 접근을 차단하고, 프로세스를 모니터링하며, 신뢰할 수 없는 디렉터리에서의 코드 실행을 막아야 한다는 것입니다.
윌리슨의 말은 더 짧습니다. 공격자의 표적이 될 위험이 있는 한 에이전트를 안전하게 실행하는 유일한 방법은 샌드박스라는 것입니다.
요약 요청 한 번, 거부됐다가 우회한 실행, 그리고 멈추지 못한 정리 명령. 이번 공개가 남긴 세 장면입니다. 승인 피로를 줄여주는 기능과 보안 경계선은 다릅니다.
Claude Code Opus 5's Auto Mode was led into executing malware by nothing more than a request to summarise a website.
The security researcher Johann Rehberger published the case on his research blog Embrace The Red. In a limited experiment, the attack succeeded 60% to 80% of the time.
Anthropic had reported a 0% prompt injection success rate in fixed-scenario testing. Two numbers, one feature.
It began with an ordinary instruction
It started as a request to summarise a website.
The attacker-controlled site presented itself as an archive of notebook records. When Claude reached it with its own web fetch tool the server returned an error, so Claude fetched the site directly with a shell command instead — and that request led to an archive file.
Inside, alongside legitimate-looking material, sat a single Python file.
The refusal became the foothold
Claude made a safe choice here: it refused to run the executable included in the archive.
So what went wrong? The detour it took afterwards. Claude wrote its own Python decoding code and imported standard modules — and ran that code inside the unpacked directory.
Python looks in the current directory first when importing a module. A file the attacker had planted under a standard library name took the real module's place, and running it came along with Claude's ordinary import.
The decoding itself worked. Claude received correctly decoded records and did not immediately realise hidden code had already run.
The safeguard blocked the defence
What follows is more worrying. In some runs, Auto Mode's safety classifier got in the way of the defence.
The developer Simon Willison reported that in some runs Claude recognised the compromise and tried to terminate the malicious process, but Auto Mode refused the cleanup command. The classifier permitted the process to be created and blocked the attempt to stop it.
Embrace The Red concluded that Auto Mode must not be treated as a security boundary. A classifier judges the risk of a single command, and may not see risk hidden in archives, local import paths, subprocesses and network requests.
60% and 80%
The experiment used a small sample. The Python-based chain succeeded in three of five runs, as did recursive execution of Claude Code; writing files outside the workspace reached four of five.
The researcher acknowledged the small sample. The direction is clear all the same: 0% in fixed scenarios, 60–80% once an attacker designs the situation.
Auto Mode exists to reduce approval fatigue — instead of asking the user to approve every command, a safety classifier reviews tool calls. Anthropic says it is safer than skipping approval entirely, while stating it does not replace a sandbox or operating-system level controls.
What users can do
So what should you do now? Embrace The Red's recommendation is isolation.
Run autonomous coding agents in isolated environments — a container, a virtual machine, a dedicated test system — restrict network access, block access to sensitive credentials, monitor processes, and prevent code execution from untrusted directories.
Willison's version is shorter: as long as an agent can be targeted by an attacker, the only way to run it safely is a sandbox.
One summary request, a refusal that was routed around, and a cleanup command that never ran. Three scenes from this disclosure. A feature that reduces approval fatigue is not a security boundary.
Sources · Wikitree