Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

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

37
Routine
HIGH 8.8UPGRADE

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.

Risk facts

CVSS score8.8 (High)
Attack vectorNetwork (remote)
Attack complexityLow
Privileges neededNone
User interactionRequired
EPSS exploit chance0.3% (top 76%)
CISA exploited listNo
WeaknessCWE-20, CWE-77
Published2026-05-05
Last modified2026-07-24
Publisher (CNA): GitHub, Inc. · Vendor: anthropic

Share: LinkedIn · X · Reddit

Last updated 2026-07-24 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

anthropic claude code UPGRADE
Affected: >= 2.1.63 and < 2.1.84
Fixed in: 2.1.84
Safe to downgrade to: a release before 2.1.63
1. Check installed version
npm ls claude-code
2. UPGRADE to 2.1.84
npm install claude-code@">=2.1.84"
3. If no update is available yet, DOWNGRADE to a release before 2.1.63
npm view claude-code versions npm install claude-code@"<2.1.63"
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
Verify at the official source NVD · CVE Program · Report a problem with this page
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

Git vulnerabilities

Related CVEs

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.