Malicious Code Injection in comparable_mole_z3n: A Threat to npm Packages
Summary
MAL-2025-100739: Malicious code in comparable_mole_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 'comparable_mole_z3n' is part of the npm ecosystem, which is widely used for JavaScript package management. This package is suspected to be linked to a token reward campaign that has led to the proliferation of malicious packages on npm. Its primary function is to facilitate the automatic generation and publication of derivative packages, which can mislead developers and inflate reputation scores within the npm registry.
Vulnerability Detail
The vulnerability in 'comparable_mole_z3n' originates from its design to include autopublish scripts that modify package.json files. These scripts remove private flags, alter version numbers, and generate random package names, leading to the continuous republishing of variants. This behavior not only pollutes the npm registry but also poses a risk of unintentional dependency on malicious packages by developers, potentially compromising their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall comparable_mole_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 remove the 'comparable_mole_z3n' package from your project by executing the command: 'npm uninstall comparable_mole_z3n'. This will prevent any malicious scripts from executing until a secure version is available.
Conclusion
The 'comparable_mole_z3n' package contains a significant vulnerability that can lead to malicious code injection. It is crucial for developers to take immediate action by updating or removing the package to safeguard their applications. Utilizing tools like Vulert can further enhance security by providing real-time monitoring for vulnerabilities.
See every vulnerability recorded for comparable_mole_z3n →
FAQ
The vulnerability can lead to the injection of malicious code into your project, potentially compromising the integrity of your application and affecting its functionality.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By uploading your package-lock.json file, you can check for vulnerabilities in real-time.
To prevent similar vulnerabilities, regularly audit your dependencies, use tools like Vulert for monitoring, and avoid using unverified packages from the npm registry.
If an immediate update is not possible, consider removing the package from your project as a temporary measure to mitigate risks.
Detailed information can be found in the vulnerability report on the Open Source Vulnerability database and through resources like Vulert.