Malicious Code Injection in bad_lion_z3n Package - npm Vulnerability
Summary
MAL-2025-99740: Malicious code in bad_lion_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 bad_lion_z3n package 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. The primary functionality of such packages is to generate and publish derivative packages that can inflate developer reputation scores for token rewards. However, this functionality has been compromised, leading to significant security concerns.
Vulnerability Detail
The vulnerability in the bad_lion_z3n package stems from its malicious code that modifies the package.json file. It removes private flags, alters version numbers, and generates random package names, which are then continuously republished to pollute the npm registry. This behavior not only compromises the integrity of the npm ecosystem but also poses risks to developers who may unknowingly install these malicious packages, potentially leading to further exploitation or data breaches.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall bad_lion_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 bad_lion_z3n package and any other packages associated with the tea.xyz token reward campaign. Monitor your package dependencies closely and consider using tools like Vulert to keep track of vulnerabilities in your project.
Conclusion
The bad_lion_z3n package poses a significant security risk due to its malicious code that alters package configurations and pollutes the npm registry. It is essential to remove this package from your project and stay vigilant about your dependencies to maintain a secure development environment.
See every vulnerability recorded for bad_lion_z3n →
FAQ
The bad_lion_z3n package is an npm package that has been identified as malicious, primarily associated with the tea.xyz token reward campaign.
The malicious code modifies your package.json file, which can lead to the installation of unwanted packages and compromise the security of your project.
If you have installed the bad_lion_z3n package, you should uninstall it immediately using 'npm uninstall bad_lion_z3n' and review your project's dependencies for any other vulnerabilities.
Regularly update your packages, monitor your dependencies using tools like Vulert, and be cautious of packages associated with token reward campaigns or those that have been flagged as malicious.
Vulert is a tool that monitors and alerts you in real-time for open-source vulnerabilities in your software. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.