Malicious Code Injection in cometcommander: A Threat to npm Users
Summary
MAL-2025-171050: Malicious code in cometcommander (npm). Affected versions are not published. 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
cometcommander is an npm package that is part of the tea.xyz token reward campaign. This package is designed to facilitate certain functionalities within the npm ecosystem. However, it has been identified as being compromised, containing malicious scripts that can manipulate package metadata and publish unauthorized variants, thereby affecting the integrity of the npm registry.
Vulnerability Detail
The vulnerability in cometcommander originates from its association with a malicious campaign that floods npm with derivative packages. The malicious payload modifies the package.json file by removing private flags, altering version numbers, and generating random package names. This behavior not only inflates developer reputation scores for token rewards but also pollutes the npm registry with potentially harmful packages, leading to security risks for developers who unknowingly use these compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall cometcommander
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 avoid using the cometcommander package until a secure version is released. Additionally, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The cometcommander package has been identified as containing malicious code that can compromise the integrity of npm projects. It is crucial for developers to remain vigilant, update their packages, and utilize tools like Vulert to monitor for vulnerabilities. By taking proactive measures, developers can safeguard their applications against potential threats.
See every vulnerability recorded for cometcommander →
FAQ
cometcommander is an npm package involved in the tea.xyz token reward campaign, which has been compromised to include malicious code.
The malicious code can modify your package.json, remove private flags, and publish unauthorized package variants, potentially leading to security vulnerabilities in your project.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just package-lock.json. Check your application at Vulert Scanner without any signup.
If you have installed cometcommander, it is recommended to update the package to the latest version or remove it from your project until a secure version is available.
Yes, consider using other npm packages that provide similar functionalities without the associated risks of malicious code.