Malicious Code Injection in lonely_earwig_z3n Package
Summary
MAL-2025-95308: Malicious code in lonely_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 lonely_earwig_z3n package is part of the npm ecosystem, which is widely used for JavaScript package management. This package, like many others, is intended to facilitate the development of applications by providing reusable code. However, it has been identified as part of a malicious campaign that aims to manipulate the npm registry by flooding it with derivative packages, thereby inflating developer reputation scores for token rewards.
Vulnerability Detail
The vulnerability in the lonely_earwig_z3n package stems from its involvement in a malicious campaign that modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior leads to the continuous republishing of these variants, which pollutes the npm registry and can compromise the integrity of the ecosystem. The malicious code is designed to execute autopublish scripts that automate the creation and publication of these harmful packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall lonely_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 lonely_earwig_z3n package and any other packages that may be part of the malicious campaign. Instead, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The lonely_earwig_z3n package poses a significant risk due to its malicious behavior, which can compromise the integrity of applications using it. It is essential to remove this package and monitor your dependencies for vulnerabilities to maintain a secure development environment.
See every vulnerability recorded for lonely_earwig_z3n →
FAQ
lonely_earwig_z3n is an npm package that has been identified as part of a malicious campaign aimed at manipulating the npm registry.
The vulnerability can lead to the introduction of malicious code into your application, potentially compromising its security and integrity.
You should uninstall the lonely_earwig_z3n package immediately and review your other dependencies for any potential vulnerabilities.
You can use tools like Vulert, which monitors your package-lock.json file to alert you in real-time for open-source vulnerabilities.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.