CVE-2026-88968
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
CVE-2026-88968 is a high vulnerability (CVSS 7.7) in Anthropics Claude-code, published November 3, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.32%, the 25th percentile. Fixed in @anthropic-ai/claude-code 2.1.251.
- Severity
- 7.7 HighCVSS 4.0, CVE List
- Exploit chance
- 0.32%EPSS, 25th percentile
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
2.1.251@anthropic-ai/claude-code
Description
Claude Code is an agentic coding tool. Prior to 2.1.251, the Edit tool validates a target using pathname and symlink resolution that is not bound to the underlying directory inode or file descriptor. On macOS, attacker-controlled code running in the Bash sandbox can atomically replace an in-workspace parent directory with a symlink after validation, causing the unsandboxed Edit implementation to overwrite a user-writable file outside the workspace. Exploitation requires attacker-controlled code to run inside the sandbox, such as from a malicious repository or dependency script. This issue is fixed in version 2.1.251.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
Discussion
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@anthropic-ai/claude-codenpm | before 2.1.251 | 2.1.251 |
What each source reports
CVE List Score used 7.7
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
Claude Code is an agentic coding tool. Prior to 2.1.251, the Edit tool validates a target using pathname and symlink resolution that is not bound to the underlying directory inode or file descriptor. On macOS, attacker-controlled code running in the Bash sandbox can atomically replace an in-workspace parent directory with a symlink after validation, causing the unsandboxed Edit implementation to overwrite a user-writable file outside the workspace. Exploitation requires attacker-controlled code to run inside the sandbox, such as from a malicious repository or dependency script. This issue is fixed in version 2.1.251.
- Record
CVE-2026-88968- CVSS 4.0
- 7.7 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-59, CWE-367
- Updated
- 2026-11-03
EUVDEUVD-2026-116209 7.7
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
- Record
EUVD-2026-116209- CVSS 4.0
- 7.7 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Updated
- 2026-11-10
GitHub AdvisoriesGHSA-5xjx-9qx6-jcrv 7.7
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
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.
- Record
GHSA-5xjx-9qx6-jcrv- CVSS 4.0
- 7.7 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-59, CWE-367
- Updated
- 2026-11-09
NVD 7.7
Claude Code is an agentic coding tool. Prior to 2.1.251, the Edit tool validates a target using pathname and symlink resolution that is not bound to the underlying directory inode or file descriptor. On macOS, attacker-controlled code running in the Bash sandbox can atomically replace an in-workspace parent directory with a symlink after validation, causing the unsandboxed Edit implementation to overwrite a user-writable file outside the workspace. Exploitation requires attacker-controlled code to run inside the sandbox, such as from a malicious repository or dependency script. This issue is fixed in version 2.1.251.
- Record
CVE-2026-88968- CVSS 4.0
- 7.7 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-59, CWE-367
- Updated
- 2026-11-04
OSV 7.7
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
Claude Code is an agentic coding tool. Prior to 2.1.251, the Edit tool validates a target using pathname and symlink resolution that is not bound to the underlying directory inode or file descriptor. On macOS, attacker-controlled code running in the Bash sandbox can atomically replace an in-workspace parent directory with a symlink after validation, causing the unsandboxed Edit implementation to overwrite a user-writable file outside the workspace. Exploitation requires attacker-controlled code to run inside the sandbox, such as from a malicious repository or dependency script. This issue is fixed in version 2.1.251.
- Record
CVE-2026-88968- CVSS 4.0
- 7.7 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-367, CWE-59
- Updated
- 2026-11-05
OSVGHSA-5xjx-9qx6-jcrv 7.7
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
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.
- Record
GHSA-5xjx-9qx6-jcrv- CVSS 4.0
- 7.7 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-367, CWE-59
- Updated
- 2026-11-09
History
| Recorded | Changed | Sources |
|---|---|---|
| published | EUVD | |
| affected, references | OSV | |
| affected, facts, references | GitHub Advisories, OSV | |
| aliases, references | NVD, OSV | |
| cwes, references, severity, title | CVE List, EUVD, NVD | |
| first indexed | EUVD |
Dates are when Every CVE recorded each change. Upstream dates may differ.
References
github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv
github.com/anthropics/claude-code/releases/tag/v2.1.251
nvd.nist.gov/vuln/detail/CVE-2026-88968
github.com/advisories/GHSA-5xjx-9qx6-jcrv
github.com/CVEProject/cvelistV5/tree/main/cves/2026/88xxx/CVE-2026-88968.json
github.com/anthropics/claude-code