Input validation error in Claude Code - CVE-2026-40068

 

Input validation error in Claude Code - CVE-2026-40068

Published: April 30, 2026


Vulnerability identifier: #VU128509
CSH Severity: High
CVSSv4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Amber
CVE-ID: CVE-2026-40068
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vulnerable software:
Claude Code
Software vendor:
Anthropic

Description

The vulnerability allows a remote attacker to execute arbitrary code.

The vulnerability exists due to improper input validation in the git worktree commondir trust check when determining folder trust for a crafted repository. A remote attacker can craft a repository with a commondir file pointing to a previously trusted path to execute arbitrary code.

Exploitation requires the victim to clone a malicious repository and run Claude Code within it, and for the attacker to know or guess a path the victim had already trusted.


Remediation

Install security update from vendor's website.

External links