Read the docs
TI-2026-28899 Aliases CVE-2026-40068GHSA-q5hj-mxqh-vv77

Claude Code arbitrary code execution via git worktree commondir trust dialog bypass

Priority LOW 35CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-77.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00314 24th percentileScored 2026-11-07
Fix Fixed claude-code (anthropics): 2.1.84@anthropic-ai/claude-code (npm): 2.1.84

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
anthropicsclaude-code2.1.63 to before 2.1.842.1.84Patch availableCNA
—@anthropic-ai/claude-code (npm)2.1.63 to before 2.1.842.1.84Patch availableGHSA-q5hj-mxqh-vv77
  • claude-code Vendoranthropics Affected 2.1.63 to before 2.1.84 Fixed in 2.1.84 Patch available CNA
  • @anthropic-ai/claude-code (npm) Vendor— Affected 2.1.63 to before 2.1.84 Fixed in 2.1.84 Patch available GHSA-q5hj-mxqh-vv77

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*2.1.63 to before 2.1.84Vulnerableanthropics
  • cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* Versions 2.1.63 to before 2.1.84 Vulnerable ·anthropics

Remediation

  • Fix · CNA claude-code (anthropics) Fixed in 2.1.84
  • Fix · GHSA-q5hj-mxqh-vv77 @anthropic-ai/claude-code (npm) Fixed in 2.1.84 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-40068
  2. 2026-10-03 Alias added: GHSA-q5hj-mxqh-vv77

References

  • TI-2025-40558 Claude Code Command Validation Bypass Allows Arbitrary Code Execution CVSS 4.0HIGH 8.7
  • TI-2025-36683 Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email CVSS 4.0HIGH 8.7
  • TI-2025-37066 Claude Code's startup trust dialog could lead to Command Execution attack CVSS 4.0HIGH 8.7
  • TI-2026-17554 Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation CVSS 4.0MEDIUM 5.3
  • TI-2025-40093 @anthropic-ai/claude-code has Sed Command Validation Bypass that Allows Arbitrary File Writes CVSS 4.0HIGH 8.7
  • TI-2025-36422 Claude Code rg command had Command Injection that allowed bypass of user approval prompt for command execution CVSS 4.0HIGH 8.7
See all 25 →

Sources