{"id":"CVE-2026-88968","aliases":["CVE-2026-88968","GHSA-5xjx-9qx6-jcrv"],"related":[],"kind":"vulnerability","state":"published","title":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"}],"published":"2026-11-03T20:08:47.362Z","modified":"2026-11-09T23:00:03.851Z","severity":{"scorer":"GitHub_M","scheme":"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","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"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","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"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","rating":"HIGH"}],"cwes":["CWE-59","CWE-367"],"affected":[{"ranges":[{"version":"< 2.1.251","status":"affected"}],"vendor":"anthropics","product":"claude-code","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.251"}],"ecosystem":"npm","package":"@anthropic-ai/claude-code","purl":"pkg:npm/%40anthropic-ai/claude-code","source":"ghsa"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.251","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-88968","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/anthropics/claude-code","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-03T21:29:03.036Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-88968","url":"https://www.cve.org/CVERecord?id=CVE-2026-88968","licence":"CVE Terms of Use","modified":"2026-11-03T21:29:17.279Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5xjx-9qx6-jcrv","url":"https://github.com/advisories/GHSA-5xjx-9qx6-jcrv","licence":"CC-BY-4.0","modified":"2026-11-09T23:00:03.851Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-88968","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-88968","licence":"Public domain","modified":"2026-11-03T22:19:50.413Z"}],"updatedAt":"2026-11-25T22:59:48.620Z","epss":{"score":0.00379,"percentile":0.3405,"date":"2026-12-01T12:00:22.000Z"}}