Skip to main content
No exploitation reportedFix available

CVE-2026-40068

No exploitation reported by the sources we read.

  • Published2026-05-05
  • Fixed in2.1.84
  • WeaknessCWE-20 · CWE-77

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

In versions 2.1.63 through 2.1.83 of Claude Code, the folder trust determination logic used the git worktree commondir file without validating its contents. An attacker could craft a malicious repository with a commondir file pointing to a path the victim had previously trusted, causing Claude Code to bypass its trust confirmation dialog and immediately execute hooks defined in `.claude/settings.json`. Exploitation requires the victim to clone the malicious repository and run Claude Code within it, and the attacker must know or guess a path the victim had already trusted. This issue has been fixed in version 2.1.84.

Timeline

dates in UTC
  1. 2026-05-0521:16CVE publishedNVD

Versions per branch

NVD · OSV
Anthropic claude code
BranchAffectedFixed in
2.1≥ 2.1.63, < 2.1.842.1.84

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • anthropics claude-code
    Affected
    • = >= 2.1.63, < 2.1.84no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2026-05-05

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • claude-cliMinimOSall versions · fixed in 2.1.206-r0
  • plural-agent-harness-claudeMinimOSall versions · no fixed version listed

Full record on NVD

Fix

  1. Update Anthropic claude code to 2.1.84

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionnone2026-05-06
  • CNACVSS 4.07.7known since 2026-10-23
  • NVDCVSS 3.18.8read 2026-10-23
  • CNAweakness (CWE)CWE-20, CWE-77known since 2026-10-23
  • FIRST EPSSEPSS score0.3 %2026-12-01
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2026-04-24

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 4.0 vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Published
2026-05-05
Last modified
2026-07-24
NVD status
Analyzed
GitHub advisory
GHSA-q5hj-mxqh-vv77

Frequently asked questions

What is CVE-2026-40068?

In versions 2.1.63 through 2.1.83 of Claude Code, the folder trust determination logic used the git worktree commondir file without validating its contents. An attacker could craft a malicious repository with a commondir file pointing to a path the victim had previously trusted, causing Claude Code to bypass its trust confirmation dialog and immediately execute hooks defined in `.claude/settings.json`. Exploitation requires the victim to clone the malicious repository and run Claude Code within it, and the attacker must know or guess a path the victim had already trusted. This issue has been fixed in version 2.1.84.

Is CVE-2026-40068 actively exploited?

Active exploitation of CVE-2026-40068 has not been confirmed. Its EPSS score was 0.3% on 2026-12-01, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-40068?

CVE-2026-40068 has a CVSS v3 base score of 8.8 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.

Running claude-cli? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record