Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
Claude Code versions before 2.1.251 on macOS are affected when attacker-controlled code runs inside the Bash sandbox. The fix is in 2.1.251.
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
- Exploited
- No known exploitation
- Fix
- Fixed in 2.1.251
- Who is exposed
- Specific setups only
Do first: Check whether your setup matches what the bug needs. Claude Code versions before 2.1.251, where the Edit tool validated targets using point-in-time pathname and symlink resolution Running on macOS Attacker-controlled code must run inside the Bash sandbox, e.g. from a malicious repository or dependency script
- Exploitation0/40No signal
- Exposure12/25Specific setups only, reachable over the network without a login
- Reach?/20Reach: unknown (data gap). No tracked technology or package matched
- Severity8.7/10CVSS 7.7, total technical impact per CISA
- No patch0/5No signal
What would change the score
- Would score about 71 if added to CISA KEV
- Would score about 66 if CISA's SSVC rates exploitation active
CVE-2026-88968 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.7 (high) and affects claude-code; fixed in 2.1.251.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- Published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 21/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Specific setups only
- Fix
- Fixed in 2.1.251
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
Claude Code, the agentic coding tool, is affected on macOS before the fixed release. An attacker who can run code inside the Bash sandbox, such as through a malicious repository or dependency script, could trick the Edit tool into overwriting a user-writable file outside the project workspace.
Read the original 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.
What to do
Check whether your setup matches what the bug needs.
Claude Code versions before 2.1.251, where the Edit tool validated targets using point-in-time pathname and symlink resolution Running on macOS Attacker-controlled code must run inside the Bash sandbox, e.g. from a malicious repository or dependency scriptUpgrade to a fixed version: 2.1.251.
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- anthropics claude-code
fixed in 2.1.251
Evidence 2
- Advisory
- Repository
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-88968
Is CVE-2026-88968 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
What does this mean?
The Edit tool checked its target paths only at one point in time, using pathname and symlink resolution. A process inside the Bash sandbox could change what a path points to after that check, so the unsandboxed Edit implementation could overwrite a user-writable file outside the workspace.Source: github.com
Which versions are affected by CVE-2026-88968?
claude-code: before 2.1.251.Source: cve.now feed data
Am I affected, and how do I check?
Claude Code versions before 2.1.251 running on macOS. The bug also requires attacker-controlled code to run inside the Bash sandbox, such as from a malicious repository or dependency script. To check, compare the installed Claude Code version against 2.1.251 and confirm the operating system is macOS.Source: github.com
How do I fix CVE-2026-88968?
Upgrade Claude Code to version 2.1.251 or later, which contains the fix.Source: github.com