{"id":"CVE-2026-88968","aliases":["EUVD-2026-116209","GHSA-5xjx-9qx6-jcrv"],"status":"published","title":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","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.","severity":{"version":"4.0","score":7.7,"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00317,"percentile":0.24904,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-367","CWE-59"],"published":"2026-11-03T20:08:47.362Z","modified":"2026-11-09T23:00:03Z","fixes":[{"ecosystem":"npm","package":"@anthropic-ai/claude-code","fixed_in":["2.1.251"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@anthropic-ai/claude-code","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.251"}]}]},{"source":"osv","ecosystem":"npm","package":"@anthropic-ai/claude-code","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.1.251"}]}]}],"products":[{"vendor":"anthropics","product":"claude-code"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.251","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-88968","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-5xjx-9qx6-jcrv"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/88xxx/CVE-2026-88968.json","tags":["advisory"]},{"url":"https://github.com/anthropics/claude-code","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-88968","title":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","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.","status":"published","published":"2026-11-03T20:08:47.362Z","modified":"2026-11-03T21:29:17.279Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high","assessor":"cna"}],"cwes":["CWE-59","CWE-367"],"updated_at":"2026-11-03T22:58:38.387176Z"}],"euvd":[{"id":"EUVD-2026-116209","description":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","status":"published","published":"2026-11-09T22:42:03Z","modified":"2026-11-09T22:42:03Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"updated_at":"2026-11-10T00:18:44.022381Z"}],"ghsa":[{"id":"GHSA-5xjx-9qx6-jcrv","title":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","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.\n\nUsers on standard Claude Code auto-update have received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nClaude Code thanks hackerone.com/mahoraga007 (Sunder Singh) for reporting this issue.","status":"published","published":"2026-11-09T22:42:03Z","modified":"2026-11-09T22:42:04Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"cwes":["CWE-59","CWE-367"],"updated_at":"2026-11-09T22:50:18.763442Z"}],"nvd":[{"id":"CVE-2026-88968","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.","status":"published","published":"2026-11-03T20:18:19.01Z","modified":"2026-11-03T22:19:50.413Z","cvss":[{"version":"4.0","score":7.7,"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/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","level":"high","assessor":"secondary"}],"cwes":["CWE-59","CWE-367"],"updated_at":"2026-11-04T00:48:10.032782Z"}],"osv":[{"id":"CVE-2026-88968","title":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","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.","status":"published","published":"2026-11-03T20:08:47.362Z","modified":"2026-11-05T03:31:29.56806442Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"cwes":["CWE-367","CWE-59"],"updated_at":"2026-11-05T07:12:28.867005Z"},{"id":"GHSA-5xjx-9qx6-jcrv","title":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","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.\n\nUsers on standard Claude Code auto-update have received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nClaude Code thanks hackerone.com/mahoraga007 (Sunder Singh) for reporting this issue.","status":"published","published":"2026-11-09T22:42:03Z","modified":"2026-11-09T23:00:03.851745985Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"cwes":["CWE-367","CWE-59"],"updated_at":"2026-11-09T23:11:26.357131Z"}]}}
