Every CVESearch/Get API key

CVE-2026-88968

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

7.7 HighFix available

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.

What does this mean?
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

0.32%Unchanged since Nov 4, 2026
90%50%10%1%

Discussion

Quiet in the last day.
14 days ago: 0 people13 days ago: 0 people12 days ago: 0 people11 days ago: 0 people10 days ago: 0 people9 days ago: 0 people8 days ago: 0 people7 days ago: 0 people6 days ago: 0 people5 days ago: 0 people4 days ago: 0 people3 days ago: 0 people2 days ago: 0 people1 day ago: 1 personLast 24 hours: 0 people

Affected products

Affected packages

Affected packages
PackageAffectedFixed
@anthropic-ai/claude-code
npm
before 2.1.251
2.1.251

What each source reports

CVE List Score used7.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 HighCVSS: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-1162097.7

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

Record
EUVD-2026-116209
CVSS 4.0
7.7 HighCVSS: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-jcrv7.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 HighCVSS: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
NVD7.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 HighCVSS: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
OSV7.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 HighCVSS: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-jcrv7.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 HighCVSS: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

History
RecordedChangedSources
publishedEUVD
affected, referencesOSV
affected, facts, referencesGitHub Advisories, OSV
aliases, referencesNVD, OSV
cwes, references, severity, titleCVE List, EUVD, NVD
first indexedEUVD

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

MoveEnter Open