Malicious Code Injection in comparative_leech_z3n: A Threat to npm Packages
Summary
MAL-2025-100747: Malicious code in comparative_leech_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 comparative_leech_z3n is part of the npm ecosystem, which is widely used for JavaScript package management. This package is associated with the tea.xyz token reward campaign, which has been known to flood the npm registry with malicious packages. These packages typically contain scripts that manipulate package metadata and inflate developer reputation scores, posing a significant risk to developers and users alike.
Vulnerability Detail
The vulnerability in comparative_leech_z3n originates from its association with malicious scripts designed to automatically publish derivative packages with altered metadata. These scripts remove private flags from package.json, change version numbers, and generate random package names, leading to pollution of the npm registry. This not only compromises the integrity of the npm ecosystem but also exposes users to potential security risks from these unverified packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall comparative_leech_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 comparative_leech_z3n package and look for alternative packages that provide similar functionality without the associated risks. If you must use it, consider isolating it in a controlled environment.
Conclusion
The comparative_leech_z3n package poses a significant risk due to its malicious code designed to manipulate package metadata and flood the npm registry. It is essential to remove this package from your projects and utilize tools like Vulert to monitor for vulnerabilities in your software.
See every vulnerability recorded for comparative_leech_z3n →
FAQ
The vulnerability involves malicious code that modifies package metadata and floods the npm registry with unverified packages.
You can use Vulert, which monitors open-source vulnerabilities in your software using package-lock.json. Check your application against this vulnerability using the Vulert playground.
You should uninstall the package immediately using 'npm uninstall comparative_leech_z3n' and check for any other affected packages.
While specific exploits have not been detailed, the manipulation of package metadata poses a risk of introducing malicious code into applications.
Regularly update your dependencies, use tools like Vulert to monitor vulnerabilities, and review package sources before installation.