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.
Auswirkung
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.
Ein Angreifer kann die Lücke über das Netzwerk ausnutzen, ohne Anmeldung, allerdings muss ein Nutzer etwas tun, etwa eine Datei oder einen Link öffnen. Bei Erfolg: hohes Risiko, dass Daten ausgelesen werden, hohes Risiko, dass Daten oder Systeme verändert werden, hohes Risiko für Ausfälle.
Betroffene Pakete
| Ökosystem | Paket | Betroffen | Behoben in |
|---|---|---|---|
| npm | @anthropic-ai/claude-code | >= 2.1.63, < 2.1.84 | 2.1.84 |
Betroffene Produkte · Anthropic
| Produkt | Betroffene Versionen |
|---|---|
| Claude Code | ab 2.1.63 vor 2.1.84 |