Malicious Code Injection in Polite Hamster Z3N Package
Summary
MAL-2025-107126: Malicious code in polite_hamster_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
Polite Hamster Z3N is an npm package that appears to be part of a token reward campaign associated with tea.xyz. It is designed to facilitate the generation and publication of derivative packages, which can inflate developer reputation scores. However, this package has been identified as malicious due to its ability to modify package metadata and republish variants that can pollute the npm registry.
Vulnerability Detail
The vulnerability in the Polite Hamster Z3N package originates from its malicious code, which is designed to remove private flags from package.json files, alter version numbers, and generate random package names. This behavior can lead to the proliferation of unwanted packages in the npm registry, potentially compromising the integrity of the ecosystem and affecting developers who rely on these packages for their projects.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall polite_hamster_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 workaround, you can avoid using the Polite Hamster Z3N package altogether and look for alternative packages that provide similar functionality without the associated risks.
Conclusion
The Polite Hamster Z3N package poses a significant risk due to its malicious code that alters package metadata and repopulates the npm registry with unwanted variants. It is crucial for developers to remove this package and monitor their projects for vulnerabilities to maintain the integrity of their software.
See every vulnerability recorded for polite_hamster_z3n →
FAQ
It is an npm package associated with a token reward campaign that has been identified as malicious.
The vulnerability can lead to the creation of unwanted packages in the npm registry, potentially compromising your project's dependencies.
You should uninstall the Polite Hamster Z3N package immediately to mitigate any risks.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using your package-lock.json file.
You can use the Vulert playground at Vulert Scanner to check for vulnerabilities without needing to sign up.