CVE-2026-39861: Claude Code Sandbox Escape Vulnerability
HIGHCVE-2026-39861 is a HIGH (CVSS 10.0) sandbox escape vulnerability (CWE-61: UNIX Symbolic Link (Symlink) Following) affecting Claude Code libraries in the npm ecosystem. The issue involves sandbox escape via symlink following allows arbitrary file write outside workspace. Remediation is available by upgrading affected packages to version 2.1.64.
CVE-2026-39861 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-39861
To remediate this vulnerability, upgrade all affected Claude Code dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @anthropic-ai/claude-code@2.1.64
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @anthropic-ai/claude-code
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-39861, inspect your project dependencies using npm:
npm ls @anthropic-ai/claude-code
Analyze the terminal output to locate any version of Claude Code in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.64), your application is affected.
Note: The npm ls @anthropic-ai/claude-code command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-61: UNIX Symbolic Link (Symlink) Following, where the product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. In Claude Code, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-39861 Affected Claude Code Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@anthropic-ai/claude-code
|
npm |
< 2.1.64
|
2.1.64
|
References
Frequently Asked Questions
What is CVE-2026-39861?
Which Claude Code versions are affected?
What version fixes CVE-2026-39861?
Is @anthropic-ai/claude-code affected?
What is the CVSS score of CVE-2026-39861?
What CWE is associated with CVE-2026-39861?
How can I check npm dependencies for CVE-2026-39861?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vp62-r36r-9xqp",
"modified" : "2026-04-27T16:34:21Z",
"published" : "2026-04-21T18:51:21Z",
"aliases" : [ "CVE-2026-39861" ],
"summary" : "Claude Code: Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace",
"details" : "Claude Code's sandbox did not prevent sandboxed processes from creating symlinks pointing to locations outside the workspace. When Claude Code subsequently wrote to a path within such a symlink, its unsandboxed process followed the symlink and wrote to the target location outside the workspace without prompting the user for confirmation. This allowed a sandbox escape where neither the sandboxed command nor the unsandboxed app could independently write outside the workspace, but their combination could write to arbitrary locations, potentially leading to code execution outside the sandbox. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window to trigger sandboxed code execution via prompt injection.\n\nUsers on standard Claude Code auto-update have received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nClaude Code thanks hackerone.com/philts for reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@anthropic-ai/claude-code"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.64"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/anthropics/claude-code/security/advisories/GHSA-vp62-r36r-9xqp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39861"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/anthropics/claude-code"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-61" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-21T18:51:21Z",
"nvd_published_at" : "2026-04-21T01:16:06Z"
}
}