Skip to content
OpenAdvisories
High · 7.7 CVE-2026-88968 EUVD-2026-116209GHSA-5xjx-9qx6-jcrv

Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace

Published Nov 3, 2026 · Updated Nov 3, 2026 · Assigned by GitHub_M

Description

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 products

VendorProductAffectedFixed
anthropics claude-code < 2.1.251 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm @anthropic-ai/claude-code < 2.1.251 2.1.251 GHSA-5xjx-9qx6-jcrv

References