CVE-2025-59828: @anthropic ai/claude code Claude Code Vulnerable To Arbitrary Vulnerability
HIGHCVE-2025-59828 is a HIGH claude code vulnerable to arbitrary vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting @anthropic ai/claude code libraries in the npm ecosystem. The issue involves claude code vulnerable to arbitrary code execution via plugin autoloading with specific yarn versions. Remediation is available by upgrading affected packages to version 1.0.39.
CVE-2025-59828 at a Glance
How to Fix CVE-2025-59828
To remediate this vulnerability, upgrade all affected @anthropic ai/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@1.0.39
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-2025-59828, inspect your project dependencies using npm:
npm ls @anthropic-ai/claude-code
Analyze the terminal output to locate any version of @anthropic ai/claude code in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.39), 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-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In @anthropic ai/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-2025-59828 Affected @anthropic ai/claude code Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@anthropic-ai/claude-code
|
npm |
< 1.0.39
|
1.0.39
|
References
Frequently Asked Questions
What is CVE-2025-59828?
Which @anthropic ai/claude code versions are affected?
What version fixes CVE-2025-59828?
Is @anthropic-ai/claude-code affected?
What CWE is associated with CVE-2025-59828?
How can I check npm dependencies for CVE-2025-59828?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2jjv-qf24-vfm4",
"modified" : "2025-12-22T16:31:26Z",
"published" : "2025-09-24T18:57:44Z",
"aliases" : [ "CVE-2025-59828" ],
"summary" : "Claude Code Vulnerable to Arbitrary Code Execution via Plugin Autoloading with Specific Yarn Versions",
"details" : "When using Claude Code with Yarn installed, Yarn config files can trigger code execution when running `yarn --version`. This could lead to a bypass of the directory trust dialog in Claude Code, as plugins and `yarnPath` could be executed prior to the user accepting the risks of working in an untrusted directory. Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nThank you to Benjamin Faller, Redguard AG and Michael Hess for reporting this issue!",
"severity" : [ {
"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" : "1.0.39"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/anthropics/claude-code/security/advisories/GHSA-2jjv-qf24-vfm4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59828"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/anthropics/claude-code"
}, {
"type" : "WEB",
"url" : "https://osv.dev/vulnerability/GHSA-2jjv-qf24-vfm4"
}, {
"type" : "WEB",
"url" : "https://www.cve.org/CVERecord?id=CVE-2025-59828"
}, {
"type" : "WEB",
"url" : "https://yarnpkg.com/advanced/plugin-tutorial"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-829", "CWE-862" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-24T18:57:44Z",
"nvd_published_at" : "2025-09-24T20:15:33Z"
}
}