Critical Malicious Code Vulnerability in @pergel/cli Package
Summary
MAL-2025-191284: Malicious code in @pergel/cli (npm). Affects @pergel/cli versions 0.11.1. No fix is published. 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 @pergel/cli package is a command-line interface tool designed for various utility functions in Node.js applications. It is widely used in the npm ecosystem for its ease of integration and functionality. However, it has recently been compromised, exposing users to significant security risks due to malicious code embedded within the package.
Vulnerability Detail
The vulnerability stems from a compromise by the Sha1-Hulud: The Second Coming NPM worm, which has infected version 0.11.1 of the @pergel/cli package. This malicious payload is capable of stealing user tokens and credentials, subsequently publishing them to GitHub. Additionally, it can propagate itself to other npm packages owned by the user and establish persistence through GitHub actions. The worm poses a severe threat as it may also delete the user's home directory, leading to potential data loss.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @pergel/cli
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 can remove the compromised package from their project by executing the following command: npm uninstall @pergel/cli. It is advisable to avoid using the package until a secure version is confirmed.
Conclusion
The @pergel/cli package has been compromised by a malicious worm that poses serious security risks. Users are urged to take immediate action by updating or uninstalling the package to protect their systems and data. Regular monitoring of dependencies is crucial to prevent future vulnerabilities.
See every vulnerability recorded for @pergel/cli →
FAQ
The malicious code is designed to steal user tokens and credentials, and it can also delete files from the user's home directory.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If you have installed version 0.11.1 of @pergel/cli, you should uninstall it immediately and check for any unauthorized access to your accounts.
Regularly monitor your dependencies for vulnerabilities using tools like Vulert, which can alert you in real-time for open-source vulnerabilities.
Failure to address this vulnerability can lead to unauthorized access to sensitive information, data loss, and further propagation of the malicious code to other packages.