Skip to main content
VulnerabilityPublished

CVE-2026-40068: anthropics claude-code · Improper Input Validation

Affects anthropics claude-codeSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.7 High : upgrade to 2.1.84 soon.

Data as of 2 Nov 2026, 22:58 UTC

CVSS 4.0 base score
7.7High
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 5 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
anthropicsclaude-codeAffected
  • >=2.1.63 <2.1.84
Fixed in
  • 2.1.84
GitHubanthropics/claude-codepkg:github/anthropics/claude-codeOther threatsAffected
  • >=2.1.63 <2.1.84
Fixed in
  • 2.1.84

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.

References

Community reviews

Loading reviews…