GHSA-5xjx-9qx6-jcrv

Suggest an improvement
Source
https://github.com/advisories/GHSA-5xjx-9qx6-jcrv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-5xjx-9qx6-jcrv/GHSA-5xjx-9qx6-jcrv.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-5xjx-9qx6-jcrv
Aliases
Published
2026-11-09T22:42:03Z
Modified
2026-11-09T23:00:03Z
Severity
  • 7.7 (High) CVSS_V4 - 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 CVSS Calculator
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.

Database specific
{
    "cwe_ids": [
        "CWE-367",
        "CWE-59"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-09T22:42:03Z",
    "nvd_published_at": "2026-11-03T20:18:19Z",
    "severity": "HIGH"
}
References

Affected packages

npm / @anthropic-ai/claude-code

Package

Name
@anthropic-ai/claude-code
View open source insights on deps.dev
Purl
pkg:npm/%40anthropic-ai/claude-code

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.1.251

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-5xjx-9qx6-jcrv/GHSA-5xjx-9qx6-jcrv.json"