8.8

CVE-2026-40068: anthropic claude_code Improper Input Validation

CVSS: 8.8v3.1HighAnalyzed
AliasesGHSA-q5hj-mxqh-vv77
Published 05-05-2026Last modified 06-05-2026

Vulnerability summary

CVE-2026-40068 is a high (CVSS 8.8) Improper Input Validation vulnerability in anthropic claude_code. EPSS estimates a 0.56% chance of exploitation in the next 30 days, higher than 45.9% of scored vulnerabilities.

Overall risk
35/100
0100
Medium · default modelHow is this calculated?
CVSS score
8.8/10
010
High · v3.1 (NVD)
EPSS score
0.56%
0%100%
Low · +0.25 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Timeline

  1. 05-05-2026
    PublishedVulnerability first disclosed.
  2. 06-05-2026
    Last modifiedVulnerability information updated.

Description

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 metrics

4 scores · 3 sources · 2 versions

EPSS trend

Probability

0.56%

Chance of exploitation in the next 30 days

Percentile

46%

Versus all other CVEs

30-day change

+0.25 pp

From 0.31% on 21-09-2026

21-09-202621-10-2026
EPSS score
0.56%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

@anthropic-ai1 product
  • claude-code≥ 2.1.63, < 2.1.84
Anthropic1 product
Anthropics1 product

3 vendors · 3 products

References

3 links