CVE Explorer
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. 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
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
1
Preserved source conflicts
No provider value was silently selected as the winner.
cwe · 2 assertions
{"cweId":"CWE-20","description":"CWE-20: Improper Input Validation","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:6cce382bbbda3d1b5f32343694d8e5f244176f188d19ec3e325e08ca2409a270 · sha256:fdee7e23b380f16f… · /containers/cna/problemTypes/0/descriptions/0
{"cweId":"CWE-77","description":"CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:6cce382bbbda3d1b5f32343694d8e5f244176f188d19ec3e325e08ca2409a270 · sha256:fdee7e23b380f16f… · /containers/cna/problemTypes/1/descriptions/0
Affected products and versions
1 source assertion{"product":"claude-code","vendor":"anthropics","versions":[{"status":"affected","version":">= 2.1.63, < 2.1.84"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:6cce382bbbda3d1b5f32343694d8e5f244176f188d19ec3e325e08ca2409a270 · sha256:fdee7e23b380f16f… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":7.7,"baseSeverity":"HIGH","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"PASSIVE","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:6cce382bbbda3d1b5f32343694d8e5f244176f188d19ec3e325e08ca2409a270 · sha256:fdee7e23b380f16f… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
2 source assertions{"cweId":"CWE-20","description":"CWE-20: Improper Input Validation","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:6cce382bbbda3d1b5f32343694d8e5f244176f188d19ec3e325e08ca2409a270 · sha256:fdee7e23b380f16f… · /containers/cna/problemTypes/0/descriptions/0
{"cweId":"CWE-77","description":"CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:6cce382bbbda3d1b5f32343694d8e5f244176f188d19ec3e325e08ca2409a270 · sha256:fdee7e23b380f16f… · /containers/cna/problemTypes/1/descriptions/0
Source references
1 source assertion{"name":"https://github.com/anthropics/claude-code/security/advisories/GHSA-q5hj-mxqh-vv77","tags":["x_refsource_CONFIRM"],"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-q5hj-mxqh-vv77"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:6cce382bbbda3d1b5f32343694d8e5f244176f188d19ec3e325e08ca2409a270 · sha256:fdee7e23b380f16f… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.