All vulnerabilities

npm

CVE-2026-88968

Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace

Severity
High
Published
9 Nov 2026
Last changed
9 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
2.1.251
Exploit chance
0.3% in the next 30 daysHigher than 24% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Time-of-check time-of-use race condition (CWE-367)Link following (CWE-59)
Also known as
GHSA-5xjx-9qx6-jcrv
Sources
OSV.dev and GitHub

Description

Claude Code validated Edit tool targets using point-in-time pathname and symlink resolution that was not bound to the underlying directory inodes or file descriptors. On macOS, a process running inside Claude Code's Bash sandbox could exploit the resulting time-of-check to time-of-use window by atomically swapping an in-workspace parent directory with a symlink after validation completed, causing the unsandboxed Edit implementation to overwrite an attacker-selected user-writable file outside the workspace. Exploiting this required the ability to run attacker-controlled code inside the sandbox, such as through a malicious repository or dependency script.

Users on standard Claude Code auto-update have received this fix automatically. Users performing manual updates are advised to update to the latest version.

Claude Code thanks hackerone.com/mahoraga007 (Sunder Singh) for reporting this issue.

From the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
@anthropic-ai/claude-codenpm · osv:npm:@anthropic-ai/claude-code
  • Every version before 2.1.251

About @anthropic-ai/claude-code

Weekly downloads (npm)
22,171,378npm, 24 Nov 2026

This is the only vulnerability in @anthropic-ai/claude-code in our list.

References