Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious project files
-
DeliveryLure developer to clone repo
-
ExploitVictim starts Claude Code in directory
-
ExecutionCode runs before trust dialog
-
ImpactArbitrary code executes as user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a user to start Claude Code (version before 1.0.111) inside an untrusted, attacker-controlled project directory; malicious code embedded in that project's files executes before the startup trust dialog is accepted, bypassing the intended trust gate. Limiting factors that reduce real-world risk: the victim must actively launch the tool in the attacker-supplied directory (passive user interaction, UI:P), no prior authentication or privileges are needed (PR:N), and users on standard auto-update already received the fix automatically - only users who manually update and remain on < 1.0.111 are exposed. |
| Impact | Signals conflict and must be weighed carefully. The CVSS 4.0 base score of 8.7 (High) reflects full compromise of the vulnerable system (VC:H/VI:H/VA:H) with no privileges required (PR:N) over a network vector (AV:N), which looks alarming in isolation. However, the EPSS score is extremely low at 0.05% (14th percentile), and the vulnerability is NOT listed in CISA KEV, indicating no evidence of widespread or active exploitation. Publicly available exploit code exists (a proof-of-concept gist), which raises the floor on opportunistic risk, but POC availability is a distinct signal from active exploitation and should not be conflated. The decisive mitigating factor is the exploitation precondition captured by UI:P: a user must actively start Claude Code inside an attacker-controlled (untrusted) directory, making this a social-engineering / supply-chain-style attack rather than a remotely sprayable one. Net assessment: this is a legitimate code-injection flaw worth patching promptly, but the low EPSS, absence of KEV, and the required user action point to targeted or opportunistic developer-focused abuse rather than mass exploitation. Note the nuance between the CVSS vector and reality: AV:N is assigned, but the practical trigger requires the victim to locally launch the tool in a malicious directory - effectively a user-initiated local execution path delivered via network-shared content. |
| Exploit ScenarioDerived | An attacker publishes a malicious repository (e.g., on a public code host) containing crafted project files. A developer clones it and starts Claude Code (version before 1.0.111) inside that directory; the embedded code executes before the user ever accepts the startup trust dialog, achieving arbitrary code execution in the developer's context. A public proof-of-concept exists, but the attack hinges on the victim launching the tool in the untrusted directory (UI:P). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Oct 08, 2026
Code injection in Anthropic's Claude Code CLI before version 1.0.111 allows malicious code embedded in a project directory to execute before the startup trust dialog is accepted, giving an attacker arbitrary command execution with the privileges of the user who launched the tool (CVSS 4.0 base 8.7). Exploitation is unauthenticated (PR:N) but depends on the victim starting Claude Code inside an attacker-controlled, untrusted directory (UI:P in the 4.0 vector; UI:R under the assessed CVSS 3.1 vector, which scores scope-unchanged confidentiality, integrity and availability impact as High). Publicly available exploit code exists in the form of a public gist, but there is no evidence of confirmed active exploitation (not listed in CISA KEV) and EPSS is low at 0.05% (14th percentile), so real-world risk is concentrated among users who manually maintain Claude Code and remain below 1.0.111 rather than the auto-update population.
Earlier versions of this analysis (1)
RemediationAI
Upgrade to Claude Code 1.0.111 or later - the vendor-released patch for this issue; a manual update such as reinstalling the npm package at or above that version (for example upgrading @anthropic-ai/claude-code to the latest published release) resolves the flaw, and users on the standard auto-update channel have already received the fix automatically. Because the flaw is a broken trust gate rather than a configuration weakness, the only complete fix is upgrading; there is no setting that fully restores the intended behavior on a vulnerable build. Interim compensating controls, each with trade-offs, are: never launch Claude Code inside directories obtained from untrusted or unverified sources (clones, archives, shared zips) - this blocks the known exploitation path but depends entirely on operator discipline and breaks the intended workflow of reviewing third-party codebases; and, where a repository must be inspected, review project files that Claude Code can act on before first launch (for example .claude configuration, hooks and MCP server definitions) and remove or quarantine anything that executes commands, accepting that a determined attacker may hide execution in less obvious artifacts and that manual review is error-prone. There is no vendor workaround documented beyond updating, and the unfixed behavior cannot be mitigated by restricting privileges alone because execution inherits the user's own permissions. Full advisory details are available at https://github.com/anthropics/claude-code/security/advisories/GHSA-4fgq-fpq9-mr3g.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Claude Code is Anthropic's agentic coding assistant, shipped as the Node.js CLI package @anthropic-ai/claude-code on npm (reflected in the affected CPE cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*). The root cause is CWE-94 (Improper Control of Generation of Code / Code Injection): the startup trust dialog - the consent gate that is supposed to prompt the user before any code or configuration from a project directory is honored - was implemented such that certain project-derived code paths were evaluated before the dialog was accepted. In practice this means project-scoped artifacts that Claude Code would normally load only after user consent could run earlier than intended, turning the act of simply opening the tool in a hostile checkout into a code execution primitive. The vulnerability is network-reachable in CVSS terms because the attacker-supplied project content is typically delivered remotely (clone, download, shared archive), but the exploit itself is triggered locally when the tool is launched; the independent assessment rates it AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, i.e. no authentication or privileges required on the target, high impact across confidentiality, integrity and availability, with the only meaningful friction being the required user interaction of launching Claude Code in the untrusted directory.
Know when Claude Code gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Malicious code is delivered via a network-shared untrusted directory (AV:N) but requires the victim to launch Claude Code there (UI:R); no privileges needed and code runs with the user's full rights (C/I/A:H).
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
5DescriptionCVE.org
Claude Code is an agentic coding tool. Versions before 1.0.111 were vulnerable to Code Injection due to a bug in the startup trust dialog implementation. Claude Code could be tricked to execute code contained in a project before the user accepted the startup trust dialog. Exploiting this requires a user to start Claude Code 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. This issue is fixed in version 1.0.111.
Executive ViewAI
Organizations using Claude Code face significant risk from CVE-2025-59536, a code injection vulnerability rated CVSS 8.8. Successful exploitation could allow attackers to execute arbitrary code or commands on affected systems, potentially leading to full system compromise. Organizations should apply vendor updates when available and consider compensating controls in the interim.
Apply vendor patch. If immediate patching is not feasible: (1) Deploy WAF rules to block injection patterns; (2) Restrict network access to affected components; (3) Enable enhanced logging for suspicious activity.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Claude Code
View allOS command injection in Anthropic Claude Code CLI and Agent SDK for Python allows remote, unauthenticated attackers to e
OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python allows local attackers to execute arbi
OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python enables arbitrary command execution vi
Sandbox escape in Claude Code versions prior to 2.1.64 enables arbitrary file writes outside the workspace by exploiting
Claude Code prior to version 2.1.2 has a CVSS 10.0 sandbox escape in the bubblewrap sandboxing mechanism, allowing code
Claude Code is an agentic coding tool. Prior to 1.0.93, Due to errors in parsing shell commands related to $IFS and shor
Claude Code prior to version 2.0.57 failed to properly validate MCP tool inputs, allowing malicious MCP servers to injec
Claude Code versions before 2.0.72 allow authenticated attackers to execute arbitrary commands by exploiting a command p
Claude Code is an agentic coding tool. Rated high severity (CVSS 8.7), this vulnerability is remotely exploitable, no au
Sandbox escape and code execution in Anthropic's Claude Code CLI (versions 2.1.38 through 2.1.162) lets a malicious repo
Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au
Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au
EUVD-2025-32507
GHSA-4fgq-fpq9-mr3g
NVD
CVE.org
EPSS
Exploit-DB