Skip to content
OpenAdvisories
High · 7.7 CVE-2026-25723 EUVD-2026-5637GHSA-mhg7-666j-cqg4

Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions

Published Feb 6, 2026 · Updated Feb 6, 2026 · Assigned by GitHub_M

Description

Claude Code is an agentic coding tool. Prior to version 2.0.55, Claude Code failed to properly validate commands using piped sed operations with the echo command, allowing attackers to bypass file write restrictions. This vulnerability enabled writing to sensitive directories like the .claude folder and paths outside the project scope. Exploiting this required the ability to execute commands through Claude Code with the "accept edits" feature enabled. This issue has been patched in version 2.0.55.

Affected products

VendorProductAffectedFixed
anthropics claude-code < 2.0.55 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm @anthropic-ai/claude-code < 2.0.55 2.0.55 GHSA-mhg7-666j-cqg4

References