Malicious Code Injection in modest_badger_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-95525: Malicious code in modest_badger_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
modest_badger_z3n is an npm package that has been identified as part of a malicious campaign targeting the npm registry. It is designed to manipulate package metadata and publish derivative packages with randomized names, thereby inflating developer reputation scores for token rewards. This behavior poses a significant risk to the integrity of the npm ecosystem.
Vulnerability Detail
The vulnerability in modest_badger_z3n originates from its association with the tea.xyz token reward campaign, which aims to exploit the npm registry. The malicious code modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This results in the continuous republishing of variants, leading to pollution of the npm registry and potential security risks for developers using these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall modest_badger_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 measure, you can avoid using the modest_badger_z3n package and replace it with a trusted alternative. Always verify the integrity of packages before installation.
Conclusion
The modest_badger_z3n package poses a significant threat to the npm ecosystem due to its malicious code that alters package metadata and republish variants. Developers are advised to uninstall this package and monitor their dependencies closely to maintain the security of their applications.
See every vulnerability recorded for modest_badger_z3n →
FAQ
The malicious code can lead to the pollution of the npm registry, making it difficult for developers to find reliable packages and potentially compromising the security of their applications.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert can help you identify if your application is affected by this vulnerability.
There is no patch available for this specific package. The recommended action is to uninstall it and avoid using it in your projects.
You should immediately uninstall the package using 'npm uninstall modest_badger_z3n' and review your project's dependencies for any other potentially malicious packages.
Regularly audit your dependencies, use trusted sources for packages, and consider using tools like Vulert to monitor for vulnerabilities in real-time.