Command Injection Affecting @anthropic-ai/claude-code package, versions <1.0.20


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.15% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-ANTHROPICAICLAUDECODE-11502065
  • published7 Aug 2025
  • disclosed5 Aug 2025
  • creditElad Beber

Introduced: 5 Aug 2025

NewCVE-2025-54795  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade @anthropic-ai/claude-code to version 1.0.20 or higher.

Overview

@anthropic-ai/claude-code is an Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.

Affected versions of this package are vulnerable to Command Injection via improper input validation in the echo command. An attacker can execute arbitrary commands by injecting untrusted content into the context window, bypassing the user approval prompt.

Note: Versions prior to 1.0.24 are deprecated and have been forced to update.

References

CVSS Base Scores

version 4.0
version 3.1