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

CVE-2026-24887: Claude Code has a Command Injection in find Command Bypasses User Approval Prompt

highCVSS 4.0 7.7GHSA-qgqw-h4xq-7w8w

Claude Code before 2.0.72 had a command parsing error that let a crafted find command skip the confirmation prompt and run untrusted commands. Reliable exploitation needs untrusted content in the agent's context window, such as prompt injection. Fixed in 2.0.72; auto-update users already have it.

Published Feb 3, 2026 · Analysis Nov 1, 2026

What an attacker can do

Claude Code asks the user to approve shell commands unless they match a safe pattern. find is normally treated as a read-only search tool. An error in how the command was parsed meant a find invocation could carry execution of another command without triggering the approval prompt. The advisory gives no payload and does not name the code path. It is typical for find to be abused through options that run commands, but the advisory does not say which mechanism applies, so treat that as background only.

The attacker cannot reach the machine directly. They need the agent to issue the crafted find, which means getting instructions into the context window: a file in a cloned repository, a web page the agent fetches, an issue or comment, or an MCP tool result. The user then sees no prompt before the command runs.

The command runs as the user running Claude Code, with access to source, SSH keys, cloud credentials and tokens. The CVSS 4.0 vector rates confidentiality, integrity and availability impact as high.

Who is affected

@anthropic-ai/claude-code before 2.0.72. Check the version:

claude --version

or:

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

The advisory says standard auto-update users already have the fix. Check pinned versions, shared containers and CI images, and machines where updates are manual.

@anthropic-ai/claude-code

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

How to fix it

Upgrade to Claude Code 2.0.72 or later.

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

The advisory names no workaround. Until you upgrade, avoid opening untrusted repositories or content in the agent, and read each approval prompt.

How to tell if you were hit

Review session transcripts and shell history for find commands the agent ran without a prompt, particularly ones with options that execute other programs or with unusual quoting. Look for unexpected child processes of the Claude Code process, new files in startup locations and outbound connections from the developer machine. Beam records agent shell commands, and its rules can flag risky ones, including find invocations that run other commands.

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 untrusted commands through the find command. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window.

Users on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version.

Claude Code thanks https://hackerone.com/alexbernier for reporting this issue!

Questions

Does CVE-2026-24887 need user interaction?

The CVSS vector marks user interaction as passive. The attacker needs untrusted content to reach the agent's context; the user is not asked to approve the command.

Which Claude Code version fixes it?

2.0.72. All earlier versions are affected, and standard auto-update users have already received the fix.

Is this exploited in the wild?

No source says so, and the entry has no CISA KEV data. The reporter is credited via HackerOne.

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