Malicious Code Detected in commander-js Package - Security Alert

commander-js Updated 02 Oct 2025

Summary

14/08/2025
CRITICAL
No i
Critical
Not published

MAL-2025-17408: Malicious code in commander-js (npm). Affected versions are not published. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The commander-js package is a popular library in the npm ecosystem, designed to facilitate the creation of command-line interfaces (CLIs) for Node.js applications. It provides a simple and intuitive API for defining commands, options, and arguments, making it a go-to choice for developers looking to enhance their CLI applications. However, recent findings have revealed that this package contains malicious code, posing significant security risks to users and their applications.

Vulnerability Detail

The vulnerability in the commander-js package stems from the inclusion of malicious code that can compromise the integrity of applications utilizing this library. This code was introduced in version 0 and can lead to unauthorized access, data breaches, or other malicious activities. Users of the package are at risk of having their systems exploited by attackers leveraging this vulnerability, making it crucial to address the issue promptly.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall commander-js

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users may consider removing the commander-js package from their projects until a secure version is released. This can be done using the command: npm uninstall commander-js. Alternatively, users can explore other CLI libraries that do not have known vulnerabilities.

Conclusion

The discovery of malicious code in the commander-js package highlights the importance of vigilance in managing dependencies within software projects. Users are urged to take immediate action by updating or removing the affected package to mitigate potential risks. Utilizing tools like Vulert can help monitor for vulnerabilities in real-time, ensuring the security of your applications.

See every vulnerability recorded for commander-js →

Share this vulnerability

FAQ

The malicious code can potentially allow unauthorized access to systems and data, posing significant security risks.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.

Consider removing the package from your project or using alternative libraries until a secure version is available.

Regularly check the official GitHub repository or subscribe to notifications for updates regarding the commander-js package.

While there is a risk of data breaches, the extent of potential data loss depends on how the malicious code is exploited. It is advisable to take immediate action to secure your application.

Related vulnerabilities

Recent vulnerabilities recorded for commander-js.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall commander-js

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback