Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
CVE-2026-88968 · GHSA-5xjx-9qx6-jcrv · published 9 Nov 2026
How serious is it
- Severity: high, CVSS score 7.7 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2026-88968?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
@anthropic-ai/claude-code(npm) < 2.1.251
How to check
- Run
npm ls @anthropic-ai/claude-codein your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
- Or run
npx shippable-dev scan localhost:3000in your project folder. It reads your lockfile and flags this vulnerability along with every other known one.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- Upgrade
@anthropic-ai/claude-codeto 2.1.251 or later, commit the lockfile and redeploy. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
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.
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.
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- github.com/anthropics/claude-code/security/advisories/GHSA-5xjx-9qx6-jcrv
- nvd.nist.gov/vuln/detail/CVE-2026-88968
- github.com/anthropics/claude-code/releases/tag/v2.1.251
- github.com/advisories/GHSA-5xjx-9qx6-jcrv
- github.com/anthropics/claude-code
Merged from GitHub Advisory Database, OSV. Last updated 10 Nov 2026. All vulnerabilities · RSS · JSON