Advisory

GHSA-5xjx-9qx6-jcrv

Also known as: CVE-2026-88968

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.

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-11-09 22:42 UTC
Modified
2026-11-09 23:00 UTC

Affected packages and fixes

@anthropic-ai/claude-code

npm · All systems

Affected

  • introduced 0, fixed 2.1.251 (semver)

Fixed versions

2.1.251

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences