Malicious Code Injection in cool_weasel_z3n: A Threat to npm Packages
Summary
MAL-2025-100997: Malicious code in cool_weasel_z3n (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
The package cool_weasel_z3n is part of the npm ecosystem, which is widely used for JavaScript package management. It is often utilized by developers to manage dependencies in their applications. However, this package has been identified as part of a malicious campaign that aims to manipulate the npm registry and inflate developer reputation scores through automated scripts.
Vulnerability Detail
The vulnerability in cool_weasel_z3n originates from its association with the tea.xyz token reward campaign. This package contains malicious scripts that modify the package.json file by removing private flags, altering version numbers, and generating random package names. The scripts continuously republish these variants, leading to pollution of the npm registry and potential 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 cool_weasel_z3n
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, you can avoid using the cool_weasel_z3n package and look for alternative packages that provide similar functionality without the associated risks.
Conclusion
The cool_weasel_z3n package poses a significant threat due to its malicious code designed to manipulate the npm registry. It is crucial for developers to be vigilant about the packages they use and to take immediate action to remove any compromised packages from their projects.
See every vulnerability recorded for cool_weasel_z3n →
FAQ
cool_weasel_z3n is an npm package that has been identified as part of a malicious campaign to manipulate the npm registry.
Using the compromised cool_weasel_z3n package can lead to security risks, including the potential exposure of sensitive data and the pollution of your project's dependencies.
If you have installed cool_weasel_z3n, you should uninstall it immediately using 'npm uninstall cool_weasel_z3n' and check your project for any other compromised packages.
You can use tools like Vulert, which monitors your package-lock.json file to alert you in real-time about open-source vulnerabilities in your software.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.