🇰🇷 한글 설명
Claude Code가 파일 경로를 검증하는 시점과 실제 쓰기 작업을 수행하는 시점 사이의 시간차(TOCTOU)를 이용한 취약점입니다. 공격자가 작업 디렉토리 내의 파일을 심볼릭 링크로 교체하면, Claude Code가 검증을 우회하여 프로젝트 외부의 임의의 파일에 데이터를 쓸 수 있습니다.
💡 쉬운 설명
프로그램이 파일이 안전한지 확인한 직후, 실제 파일을 쓰기 전에 파일의 정체가 바뀌는 틈을 타서 엉뚱한 파일을 수정하게 만드는 공격입니다. 이를 통해 공격자는 시스템의 중요한 설정 파일을 몰래 변경할 수 있습니다.
🇺🇸 원문 (English)
Claude Code validated that a target file path resided within the project working directory at permission-check time, but re-resolved the path at write time without repeating that validation. This time-of-check to time-of-use (TOCTOU) gap allowed an attacker who could write to the workspace to atomically replace a project file with a symlink, causing Claude Code to follow the symlink and write its output to an arbitrary file outside the project sandbox. Exploitation required the ability to win a race condition against the write operation and write access to the shared workspace, enabling a lower-privileged attacker to redirect benign edits to sensitive files (e.g., shell configuration) in a higher-privileged session.
Users on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version.
Thank you to hackerone.com/c_h4ck_0 for reporting this issue.
📍 영향받는 시스템
Claude Code (수동 업데이트 사용자 중 최신 버전 미설치 버전)
⚔️ 공격 벡터
공유된 작업 공간에 쓰기 권한이 있는 공격자가 레이스 컨디션을 이용해 프로젝트 파일을 심볼릭 링크로 교체
🛡️ 대응 방법
Claude Code를 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 보안 패치가 적용된 최신 버전인지 확인하십시오.