Malicious Code Injection in top_earwig_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-91218: Malicious code in top_earwig_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 top_earwig_z3n is part of a series of npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. This behavior poses a significant risk to the integrity of the npm registry and can lead to the proliferation of malicious software.
Vulnerability Detail
The vulnerability in top_earwig_z3n originates from its malicious design, which includes scripts that modify the package.json file to remove private flags, alter version numbers, and generate random package names. This results in the continuous republishing of variants that can pollute the npm registry, potentially leading to security risks for developers who unknowingly integrate these packages into their projects.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall top_earwig_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 top_earwig_z3n package and replace it with a trusted alternative. Always verify the source and integrity of packages before including them in your project.
Conclusion
The top_earwig_z3n package poses a significant threat due to its malicious code designed to manipulate the npm registry. It is essential to remove this package from your projects and utilize tools like Vulert to monitor for vulnerabilities. Staying informed and vigilant can help protect your applications from such threats.
See every vulnerability recorded for top_earwig_z3n →
FAQ
top_earwig_z3n is an npm package that is part of a malicious campaign aimed at inflating developer reputation scores through automated publishing of derivative packages.
If your project uses the top_earwig_z3n package, it may inadvertently include malicious code that can compromise your application's security and integrity.
You should uninstall the top_earwig_z3n package immediately using the command: npm uninstall top_earwig_z3n.
You can use tools like Vulert, which monitors your package-lock.json file for open-source vulnerabilities in real-time without requiring code access or installation.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.