Malicious Code Injection in bare_badger_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-93349: Malicious code in bare_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
bare_badger_z3n is an npm package that has been identified as part of a malicious campaign targeting the npm registry. This package is associated with the tea.xyz token reward initiative, which aims to inflate developer reputation scores through the automatic generation and publication of derivative packages. The malicious nature of this package compromises the integrity of the npm ecosystem by introducing harmful scripts and altering package metadata.
Vulnerability Detail
The vulnerability in bare_badger_z3n stems from its design to include malicious code that modifies the package.json file. This code removes private flags, alters version numbers, and generates random package names, which are then republished to the npm registry. The origin of this vulnerability is linked to the tea.xyz token reward campaign, which exploits npm's publishing mechanisms to create a flood of derivative packages, thereby polluting the registry and potentially leading to security risks for developers who unknowingly use these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall bare_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 workaround, avoid using bare_badger_z3n and any other packages associated with the tea.xyz token reward campaign. Instead, consider using well-established and reputable packages that serve similar functionalities without the risk of malicious code.
Conclusion
The bare_badger_z3n package poses a significant threat to the npm ecosystem due to its malicious code that alters package metadata and floods the registry with derivative packages. It is crucial for developers to remove this package from their projects and monitor for vulnerabilities using tools like Vulert to ensure the security of their applications.
See every vulnerability recorded for bare_badger_z3n →
FAQ
bare_badger_z3n is an npm package linked to a malicious campaign that aims to inflate developer reputation scores through the automatic generation of derivative packages.
The malicious code modifies your package.json file, removes private flags, changes version numbers, and can lead to the pollution of the npm registry, potentially compromising your project's integrity.
If you have installed bare_badger_z3n, you should uninstall it immediately using 'npm uninstall bare_badger_z3n' and check for any other affected packages.
You can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in your software using just package-lock.json. You can check your application for vulnerabilities without signing up at the Vulert playground.
Yes, consider using well-established and reputable packages that provide similar functionalities without the associated risks of malicious code.