In versions 2.1.63 through 2.1.83 of Claude Code, the folder trust determination logic used the git worktree…
Historical advisory recorded 25 Oct 2026 09:17:24 UTC. Read the latest advisory.
nvd · CVE-2026-40068
PublishedIn 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.
Read the publisher's advisoryAffected versions, risk and source history
nvd · CVE-2026-40068
PublishedNVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Analyzed
Weakness classifications: CWE-20 · CWE-77 · NVD-CWE-noinfo
Original publisher date fields
published: 2026-05-05T21:16:23.093
lastModified: 2026-07-24T21:10:00.143
1 source CPE criteria · context only
- cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.
Original source record · Cite this exact observation · Complete original publisher JSON