NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Claude Code

CVE-2025-54795: Claude Code echo command allowed bypass of user approval prompt for command execution

highCVSS 4.0 8.7GHSA-x56v-x2h6-7j34

A command parsing error in Claude Code let an echo command skip the user confirmation prompt and run an untrusted command. An attacker who can put untrusted content in the agent's context can trigger it. The npm package @anthropic-ai/claude-code is affected before 1.0.20. Upgrade to 1.0.20 or later.

Published Aug 4, 2025 · Updated Aug 5, 2025 · Analysis Nov 1, 2026

What an attacker can do

Claude Code asks the user to approve shell commands that are not on its safe list. Echo is a harmless command, so it normally runs without a prompt. The advisory says an error in command parsing allowed an echo command to get past the confirmation step and cause an untrusted command to run. It does not describe the parsing flaw in more detail or give a proof of concept.

The attacker must get content in front of the model. That could be a file in a cloned repository, a web page the agent fetches, an issue text or tool output. The content contains instructions that make the agent issue the crafted echo command. The user never sees the approval prompt that would have stopped it. The CVSS vector shows no privileges and passive user interaction.

In practice the result is arbitrary command execution as the developer, which exposes source code, SSH keys, cloud credentials and tokens on that machine. The advisory rates confidentiality, integrity and availability impact as high.

Who is affected

The package data lists @anthropic-ai/claude-code before 1.0.20 as affected. The advisory also says current users are unaffected, because versions before 1.0.24 are deprecated and were forced to update. Pinned, offline or containerized copies may still run an old build, so verify them.

claude --version
npm ls -g @anthropic-ai/claude-code

@anthropic-ai/claude-code

Ecosystem
npm
Affected
< 1.0.20
Fixed in
1.0.20
Check
npm ls @anthropic-ai/claude-code

How to fix it

Upgrade to @anthropic-ai/claude-code 1.0.20 or later. Standard auto-update installed the fix after release.

npm install -g @anthropic-ai/claude-code@latest

The advisory lists no workaround besides upgrading. Do not point the agent at untrusted repositories or web content while running an older build.

How to tell if you were hit

Review recorded shell commands from agent sessions for echo commands that contain command substitution, backticks, pipes, redirections or chained commands, or that were followed by network calls or unexpected child processes. Check which sessions read untrusted files or pages before the command ran. Beam records agent shell commands and its rules flag risky ones, so you can search its local records for echo commands that do more than print text.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Due to an error in command parsing, it was possible to bypass the Claude Code confirmation prompt to trigger execution of an untrusted command. Reliably exploiting this requires the ability to add untrusted content into a Claude Code context window.

Users on standard Claude Code auto-update received this fix automatically after release. Current users of Claude Code are unaffected, as versions prior to 1.0.24 are deprecated and have been forced to update.

Thank you to Elad Beber (Cymulate) for reporting this issue!

Questions

Is Claude Code 1.0.20 or newer affected by CVE-2025-54795?

No. 1.0.20 is the patched version. The advisory adds that versions before 1.0.24 were forced to update, so up-to-date installs are unaffected.

Does the attacker need access to my machine?

No. The attacker needs to get untrusted content into the agent's context window, such as through a file or web content. The CVSS vector shows no privileges and passive user interaction.

Is there a workaround?

The advisory lists none other than upgrading. The reporter was Elad Beber of Cymulate.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Claude Code vulnerabilities

All Claude Code entries