Malicious Code Injection in better_halibut_z3n: A Threat to npm Users
Summary
MAL-2025-93371: Malicious code in better_halibut_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 'better_halibut_z3n' 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. Its primary function is to facilitate the distribution of JavaScript libraries, but it has been compromised to include harmful scripts that manipulate package metadata.
Vulnerability Detail
The vulnerability in 'better_halibut_z3n' originates from its association with a malicious campaign that aims to inflate developer reputation scores for token rewards. The package contains scripts that automatically modify the package.json file by removing private flags, altering version numbers, and generating random package names. This behavior leads to the continuous republishing of variants, polluting the npm registry and potentially compromising the integrity of other packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall better_halibut_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 'better_halibut_z3n' package altogether and look for alternative packages that provide similar functionality without the associated risks.
Conclusion
The 'better_halibut_z3n' package poses a significant risk due to its malicious code designed to manipulate npm registry data. It is essential for developers to be vigilant and take immediate action to remove this package and monitor their dependencies for vulnerabilities.
See every vulnerability recorded for better_halibut_z3n →
FAQ
The malicious code can lead to the pollution of the npm registry, affecting the integrity of other packages and potentially compromising your application.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By uploading your package-lock.json file, you can check for vulnerabilities without needing to install any software.
You should uninstall the package immediately using 'npm uninstall better_halibut_z3n' and look for alternative packages.
Regularly audit your dependencies using tools like Vulert and keep your packages updated to the latest secure versions.
Signs include unexpected behavior, performance issues, or the presence of unknown packages in your project dependencies.