Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
cve-program · CVE-2026-88968
PublishedClaude 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.
Read the publisher's advisoryeuvd · EUVD-2026-116209
PublishedClaude 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.
Read the publisher's advisorynvd · CVE-2026-88968
PublishedClaude 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.
Read the publisher's advisoryosv · GHSA-5xjx-9qx6-jcrv
PublishedClaude 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.
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2026-88968 · CVE overview and exploitation status
cve-program · CVE-2026-88968
- https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv
- https://github.com/anthropics/claude-code/releases/tag/v2.1.251
euvd · EUVD-2026-116209
- https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv
- https://github.com/anthropics/claude-code/releases/tag/v2.1.251
nvd · CVE-2026-88968
- https://github.com/anthropics/claude-code/releases/tag/v2.1.251
- https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv
osv · GHSA-5xjx-9qx6-jcrv
Related changes
Linked by CVE identifier- 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 runni… · Advisory content revised · 12 Nov 2026
- Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace · Newly collected advisory · 10 Nov 2026
- Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace · Newly collected advisory · 3 Nov 2026