{"id":"CVE-2026-88968","aliases":["GHSA-5xjx-9qx6-jcrv"],"summary":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","published_at":"2026-11-03T20:08:47.362Z","modified_at":"2026-11-09T23:00:03.851745Z","products":[],"rating":{"severity":"high","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","attack_path":"internet_unauthenticated","user_interaction":true,"malicious":false,"red_hat":"Important","vendor_ratings":[{"source":"Red Hat","rating":"Important"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.003169999923557043,"percentile":0.2519400119781494,"date":"2026-11-19T00:00:00Z"},"priority":9.2,"details":"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.","affected_stack":[],"affected_other":[{"ecosystem":"CVE","package":"anthropics/claude-code","versions":["< 2.1.251"],"provider":"cvelistv5","source":"CVE-2026-88968","relation":"self"},{"ecosystem":"npm","package":"@anthropic-ai/claude-code","purl":"pkg:npm/%40anthropic-ai/claude-code","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.1.251"}]}],"fixed":["2.1.251"],"provider":"osv","source":"GHSA-5xjx-9qx6-jcrv","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","cpe":"cpe:/a:redhat:openshift_devspaces:3","status":"affected","packages":["devspaces/pluginregistry-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2026-88968"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2026-88968","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2026-88968","license":"CC-BY-4.0","published_at":"2026-11-03T20:08:47.362Z","modified_at":"2026-11-03T21:29:17.279Z","summary":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","details":"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":[{"type":"CVSS_V4","score":"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","source":"CVE-2026-88968"}],"affected":[{"ecosystem":"CVE","package":"anthropics/claude-code","versions":["< 2.1.251"],"provider":"cvelistv5","source":"CVE-2026-88968","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv"},{"type":"WEB","url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.251"}]},{"provider":"osv","source_id":"GHSA-5xjx-9qx6-jcrv","relation":"self","url":"https://osv.dev/vulnerability/GHSA-5xjx-9qx6-jcrv","license":"CC-BY-4.0","published_at":"2026-11-09T22:42:03Z","modified_at":"2026-11-09T23:00:03.851745Z","summary":"Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace","details":"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.","severity":[{"type":"CVSS_V4","score":"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","source":"GHSA-5xjx-9qx6-jcrv"}],"affected":[{"ecosystem":"npm","package":"@anthropic-ai/claude-code","purl":"pkg:npm/%40anthropic-ai/claude-code","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.1.251"}]}],"fixed":["2.1.251"],"provider":"osv","source":"GHSA-5xjx-9qx6-jcrv","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-88968"},{"type":"PACKAGE","url":"https://github.com/anthropics/claude-code"},{"type":"WEB","url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.251"}]},{"provider":"redhat-vex","source_id":"CVE-2026-88968","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2026-88968","license":"CC-BY-4.0","published_at":"2026-11-03T20:08:47.362Z","modified_at":"2026-11-05T08:03:33Z","summary":"claude-code: claude-code: Sandbox escape via symlink replacement","details":"A flaw was found in Claude Code. An attacker capable of executing code within the tool's sandbox can overwrite arbitrary files outside the designated workspace, leading to a sandbox escape. This issue occurs because the Edit tool verifies file paths without securing them against changes to the underlying directory structure. By replacing a verified directory with a symbolic link (a reference pointing to another file path), the attacker can redirect file modification operations to sensitive locations on the host system.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","source":"CVE-2026-88968"},{"type":"Red Hat","score":"Important","source":"CVE-2026-88968"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","cpe":"cpe:/a:redhat:openshift_devspaces:3","status":"affected","packages":["devspaces/pluginregistry-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2026-88968"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-88968.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-88968"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2566282"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-88968"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-88968"},{"type":"WEB","url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.251"},{"type":"WEB","url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv"}]}],"references":[{"type":"WEB","url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv"},{"type":"WEB","url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.251"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-88968"},{"type":"PACKAGE","url":"https://github.com/anthropics/claude-code"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-88968.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-88968"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2566282"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-88968"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2026-88968","url":"https://www.cve.org/CVERecord?id=CVE-2026-88968","license":"CC-BY-4.0","modified_at":"2026-11-03T21:29:17.279Z","relation":"self"},{"provider":"osv","source_id":"GHSA-5xjx-9qx6-jcrv","url":"https://osv.dev/vulnerability/GHSA-5xjx-9qx6-jcrv","license":"CC-BY-4.0","modified_at":"2026-11-09T23:00:03.851745Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2026-88968","url":"https://access.redhat.com/security/cve/CVE-2026-88968","license":"CC-BY-4.0","modified_at":"2026-11-05T08:03:33Z","relation":"self"}]}
