{"id":"CVE-2026-25722","aliases":["CVE-2026-25722","GHSA-66q4-vfjg-2qhh"],"related":[],"kind":"vulnerability","state":"published","title":"Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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!","format":"markdown","source":"ghsa"},{"lang":"es","text":"Claude Code es una herramienta de codificación agéntica. Antes de la versión 2.0.57, Claude Code no validaba correctamente los cambios de directorio cuando se combinaba con operaciones de escritura en carpetas protegidas. Al usar el comando cd para navegar a directorios sensibles como .claude, era posible eludir la protección contra escritura y crear o modificar archivos sin confirmación del usuario. La explotación fiable de esto requería la capacidad de añadir contenido no confiable en una ventana de contexto de Claude Code. Este problema ha sido parcheado en la versión 2.0.57.","source":"nvd"}],"published":"2026-02-06T17:52:42.069Z","modified":"2026-06-17T10:25:06.257Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-20","CWE-78"],"affected":[{"ranges":[{"version":"< 2.0.57","status":"affected"}],"vendor":"anthropics","product":"claude-code","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.57"}],"ecosystem":"npm","package":"@anthropic-ai/claude-code","purl":"pkg:npm/%40anthropic-ai/claude-code","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.0.57"}],"vendor":"anthropic","product":"claude_code","cpe":"cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-66q4-vfjg-2qhh","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25722","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/anthropics/claude-code","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-02-06T18:41:50.485Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25722","url":"https://www.cve.org/CVERecord?id=CVE-2026-25722","licence":"CVE Terms of Use","modified":"2026-02-06T18:42:01.040Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-66q4-vfjg-2qhh","url":"https://github.com/advisories/GHSA-66q4-vfjg-2qhh","licence":"CC-BY-4.0","modified":"2026-02-06T19:56:44.198Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25722","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25722","licence":"Public domain","modified":"2026-06-17T10:25:06.257Z"}],"updatedAt":"2026-11-25T22:59:13.561Z","epss":{"score":0.00509,"percentile":0.44977,"date":"2026-12-01T12:00:22.000Z"}}