Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| anthropics | claude-code | affected |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Anthropics | Claude Code |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-5xjx-9qx6-jcrv | Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace |
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.317% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Anthropics
Anthropics claude Code |
|
| Vendors & Products |
Anthropics
Anthropics claude Code |
| Type | Values Removed | Values Added |
|---|---|---|
| References |
| |
| Metrics |
threat_severity
|
cvssV3_1
|
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace | |
| Weaknesses | CWE-367 CWE-59 |
|
| References |
| |
| Metrics |
cvssV4_0
|