CVE-2026-88968: Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
Published 2026-11-09 · Updated 2026-11-09 · Also known as GHSA-5xjx-9qx6-jcrv
Summary
Claude Code contains a TOCTOU race condition in the Edit tool that allows unauthorized file writes outside the intended workspace via symlink manipulation. Users of versions prior to 2.1.251 should update immediately to remediate the vulnerability.
Who is affected
This vulnerability affects deployments of @anthropic-ai/claude-code on macOS where an attacker can execute code within the Bash sandbox. By exploiting a time-of-check to time-of-use window during directory validation, an attacker can overwrite arbitrary user-writable files outside the sandbox boundaries.
Exploitability
The vulnerability is rated as High severity, requiring low attack complexity but physical or social engineering-adjacent preconditions to achieve code execution. It currently has a low EPSS score of 0.003 and is not listed in CISA's Known Exploited Vulnerabilities catalog.
Remediation
- Update @anthropic-ai/claude-code to version 2.1.251 or later.
- Verify the installation version to ensure the automatic update was applied.
How to check your project
- Check the package.json file or run 'npm list @anthropic-ai/claude-code' to determine the current version installed in the project.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| npm | @anthropic-ai/claude-code |
>= 0, < 2.1.251 | 2.1.251 | npm install @anthropic-ai/[email protected] |
CVSS 4.0 vector
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
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Attack requirements | Present |
| Privileges required | None |
| User interaction | Passive |
| Confidentiality (vulnerable system) | High |
| Integrity (vulnerable system) | High |
| Availability (vulnerable system) | High |
| Confidentiality (subsequent systems) | None |
| Integrity (subsequent systems) | None |
| Availability (subsequent systems) | None |
Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.
FAQ
What is the root cause of this vulnerability?
The flaw is caused by a Time-of-Check to Time-of-Use (TOCTOU) race condition in the Edit tool, where pathname validation is not bound to directory inodes or file descriptors.
Is this vulnerability actively being exploited?
There is no evidence of active exploitation, and the vulnerability is not listed on the CISA Known Exploited Vulnerabilities catalog.
How can an attacker exploit this?
An attacker needs the ability to execute code within the Claude Code Bash sandbox, such as through a malicious repository or a compromised dependency script, to perform the atomic directory swapping required.
Original advisory description
References
- WEB https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-88968
- PACKAGE https://github.com/anthropics/claude-code
- WEB https://github.com/anthropics/claude-code/releases/tag/v2.1.251
Source records: GHSA-5xjx-9qx6-jcrv (OSV.dev) · EPSS by FIRST, 2026-11-27.