{"id":"CVE-2026-25722","aliases":["EUVD-2026-5636","GHSA-66q4-vfjg-2qhh"],"status":"published","title":"Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection","description":"Claude Code is an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.","severity":{"version":"4.0","score":7.7,"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00509,"percentile":0.43934,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20","CWE-78"],"published":"2026-02-06T17:52:42Z","modified":"2026-06-17T10:25:06Z","fixes":[{"ecosystem":"npm","package":"@anthropic-ai/claude-code","fixed_in":["2.0.57"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@anthropic-ai/claude-code","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.57"}]}]},{"source":"osv","ecosystem":"npm","package":"@anthropic-ai/claude-code","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.57"}]}]}],"products":[{"vendor":"anthropic","product":"claude_code"},{"vendor":"anthropics","product":"claude-code"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-66q4-vfjg-2qhh","tags":["x_refsource_CONFIRM","Vendor Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25722","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-66q4-vfjg-2qhh"},{"url":"https://github.com/anthropics/claude-code","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-25722","title":"Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection","description":"Claude Code is an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.","status":"published","published":"2026-02-06T17:52:42.069Z","modified":"2026-02-06T18:42:01.04Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high","assessor":"cna"}],"cwes":["CWE-20","CWE-78"],"updated_at":"2026-11-02T13:41:19.694734Z"}],"euvd":[{"id":"EUVD-2026-5636","description":"Claude Code is an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.","status":"published","published":"2026-02-06T17:52:42Z","modified":"2026-02-06T18:42:01Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"updated_at":"2026-11-02T19:48:42.836553Z"}],"ghsa":[{"id":"GHSA-66q4-vfjg-2qhh","title":"Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection","description":"Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the `cd` command to navigate into sensitive directories like `.claude`, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. \n\nUsers on standard Claude Code auto-update received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nAbout\nClaude Code thanks hackerone.com/nil221 for reporting this issue!","status":"published","published":"2026-02-06T19:02:41Z","modified":"2026-02-06T19:02:42Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"cwes":["CWE-20","CWE-78"],"updated_at":"2026-11-02T14:39:23.728882Z"}],"nvd":[{"id":"CVE-2026-25722","description":"Claude Code is an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.","status":"published","published":"2026-02-06T18:15:59.077Z","modified":"2026-06-17T10:25:06.257Z","cvss":[{"version":"4.0","score":7.7,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"primary"}],"cwes":["CWE-20","CWE-78"],"updated_at":"2026-11-02T14:12:05.52517Z"}],"osv":[{"id":"GHSA-66q4-vfjg-2qhh","title":"Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection","description":"Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the `cd` command to navigate into sensitive directories like `.claude`, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. \n\nUsers on standard Claude Code auto-update received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nAbout\nClaude Code thanks hackerone.com/nil221 for reporting this issue!","status":"published","published":"2026-02-06T19:02:41Z","modified":"2026-02-06T19:56:44.198671Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"cwes":["CWE-20","CWE-78"],"updated_at":"2026-11-02T15:46:39.266402Z"}]}}
