CVE-2026-40068: In versions 2.1.63 through 2.1.83 of Claude Code, the folder trust determination logic used the git worktree c
CVE-2026-40068 is a high-severity flaw (CVSS 8.8) affecting claude code. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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 th
Why this priority
- High severity
A fixed release or distro patch exists.
Last updated 2026-07-24 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-40068?
claude code: upgrade to 2.1.84. Exact commands for each OS are on this page.
Is CVE-2026-40068 being exploited?
CVE-2026-40068 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-40068 affect?
CVE-2026-40068 affects claude code. Severity is high (CVSS 8.8). 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
How urgent is CVE-2026-40068?
Priority 37/100. High severity
Software pages
Related CVEs
- CVE-2026-39861 CRITICAL 10.0 UPGRADE Claude Code is an agentic coding tool
- CVE-2026-35603 HIGH 7.3 UPGRADE Claude Code is an agentic coding tool
- CVE-2026-54316 CRITICAL 9.1 UPGRADE Claude Code is an agentic coding tool
- CVE-2026-55607 HIGH 8.8 UPGRADE Claude Code is an agentic coding tool
- CVE-2026-46406 MEDIUM 6.1 UPGRADE Claude Code is an agentic coding tool