CVE-2026-24887: Command Injection Vulnerability in @anthropic-ai/claude-code Allows Bypass of User Approval Prompt
Summary
CVE-2026-24887: Claude Code has a Command Injection in find Command Bypasses User Approval Prompt. Affects @anthropic-ai/claude-code versions < 2.0.72. Fixed in 2.0.72. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @anthropic-ai/claude-code package is a tool designed for developers to leverage AI capabilities in their applications. It provides functionalities that allow for seamless integration of AI-driven features. However, due to a flaw in its command parsing logic, the package has become susceptible to a command injection vulnerability, which can lead to unauthorized command execution.
Vulnerability Detail
The vulnerability arises from an error in the command parsing mechanism of the find command within the @anthropic-ai/claude-code package. This flaw allows an attacker to bypass the user approval prompt, enabling the execution of untrusted commands. To exploit this vulnerability, an attacker must have the ability to inject malicious content into a Claude Code context window. The potential ramifications include unauthorized access to system commands, which could compromise the integrity and security of the system running the application.
How To Fix
Latest published version: 2.1.308 as of 23 Oct 2026
npm install @anthropic-ai/claude-code@2.1.308
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.0.72
This is the first release that contains the fix.
npm install @anthropic-ai/claude-code@2.0.72
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to update to the patched version of the package as soon as possible.
Conclusion
The CVE-2026-24887 vulnerability in the @anthropic-ai/claude-code package poses a significant risk due to its command injection flaw. Users are strongly advised to update to the latest version to protect their applications from potential exploitation.
See every vulnerability recorded for @anthropic-ai/claude-code →
FAQ
CVE-2026-24887 is a command injection vulnerability in the @anthropic-ai/claude-code package that allows attackers to bypass user approval prompts.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your package-lock.json for vulnerabilities.
While there are no specific workarounds, it is crucial to prioritize updating the package to mitigate the risk of exploitation.
The vulnerability could allow unauthorized execution of commands, potentially leading to data breaches or system compromise.
The CVSS score for this vulnerability is 7.7, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for @anthropic-ai/claude-code.