{"id":"GHSA-q5hj-mxqh-vv77","revision":"7d0854a4e5324094b2ec34e26926de3c","records":[{"revision":"7d0854a4e5324094b2ec34e26926de3c","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-q5hj-mxqh-vv77","aliases":["CVE-2026-40068"],"title":"Claude Code: Trust Dialog Bypass via Git Worktree Spoofing Allows Arbitrary Code Execution","description":"Claude Code used the git worktree `commondir` file when determining folder trust but did not validate its contents. By crafting a repository with a `commondir` file pointing to a path the victim had previously trusted, an attacker could bypass the trust dialog and immediately execute malicious hooks defined in `.claude/settings.json`. Exploiting this required 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.\n\nUsers on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version.\n\nClaude Code thanks [hackerone.com/masato_anzai](https://hackerone.com/masato_anzai) for reporting this issue.","state":0,"publishedAt":"2026-04-24T16:34:03+00:00","modifiedAt":"2026-05-08T15:50:36.976042+00:00","affected":[{"ecosystem":"npm","name":"@anthropic-ai/claude-code","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.1.63"},{"kind":"fixed","version":"2.1.84"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/anthropics/claude-code/security/advisories/GHSA-q5hj-mxqh-vv77","https://nvd.nist.gov/vuln/detail/CVE-2026-40068","https://github.com/anthropics/claude-code"],"sourceUrl":"https://github.com/advisories/GHSA-q5hj-mxqh-vv77","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-q5hj-mxqh-vv77","identifiers":["GHSA-q5hj-mxqh-vv77","CVE-2026-40068"]},"retained":false,"historicalAffected":[]}],"coverage":[]}