---
cve: "CVE-2026-40068"
severity: "HIGH"
cvss: 7.7
epss: "31%"
vendor: "anthropics"
kev: false
exploited: false
published: "2026-05-05 21:16:23"
tags: [cve, security, high]
source: tsecurity.de CVE-Dossier
exported: "2026-09-12T08:21:51+02:00"
---

# CVE-2026-40068

> 7.7 HIGH · 🧪 PoC

## Beschreibung

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.

## CVSS-Vektor

```
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
```

| Metrik | Wert | Bewertung |
|---|---|---|
| AV Angriffsvektor | Netzwerk | bad |
| AC Komplexität | Gering | bad |
| PR Privilegien | Keine | bad |

## Patch verfügbar (OSV)

- a0d9b87038e72d8a523b61c152ec53299ac6fe94 (Commit)

## Referenzen

- <https://github.com/anthropics/claude-code/security/advisories/GHSA-q5hj-mxqh-vv77>

---
_Exportiert aus dem [tsecurity.de CVE-Dossier](https://tsecurity.de/cve?cve=CVE-2026-40068) · Datenquellen: EUVD (ENISA), NVD, OSV, CISA KEV, FIRST EPSS, Exploit-DB, BSI BITS_
