CVE-2026-40068: anthropics claude-code · Improper Input Validation
Affects anthropics claude-codeSource CVE Database V5
Not known to be exploited · CVSS 7.7 High : upgrade to 2.1.84 soon.
Data as of 2 Nov 2026, 22:58 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 24% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.1.84
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 5 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2 Nov 2026.
What to do
Upgrade claude-code and anthropics/claude-code to 2.1.84.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| anthropicsclaude-code | Affected
| Fixed in
|
GitHubanthropics/claude-codepkg:github/anthropics/claude-codeOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
This vulnerability has been fixed in Claude Code version 2.1.84. Users should upgrade to version 2.1.84 or later to remediate this issue. Until upgrading, users should avoid cloning and running Claude Code within repositories from untrusted sources, especially if the attacker might know or guess trusted paths on the system. Patch status is confirmed fixed in version 2.1.84.
Description
CVE-2026-40068 is a high-severity vulnerability in anthropics Claude Code versions 2.1.63 through 2.1.83. The issue arises from improper input validation of the git worktree commondir file used in folder trust determination logic. An attacker can craft a malicious repository with a commondir file that points to a path the victim has previously trusted, causing Claude Code to bypass its trust confirmation dialog and execute hooks defined in . claude/settings.json without user consent. Exploitation requires the victim to clone the malicious repository and run Claude Code within it, and the attacker must know or guess a trusted path on the victim's system.