Malicious Code Injection in hard_crocodile_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-94787: Malicious code in hard_crocodile_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 'hard_crocodile_z3n' is part of a series of malicious npm packages associated with the tea.xyz token reward campaign. These packages are designed to manipulate the npm registry by creating and publishing numerous derivative packages with randomized names, thereby inflating developer reputation scores for token rewards. The malicious nature of this package poses significant risks to developers and the integrity of the npm ecosystem.
Vulnerability Detail
The vulnerability in 'hard_crocodile_z3n' originates from its inclusion in a campaign that floods the npm registry with malicious packages. The payload modifies the package.json file to remove private flags, alters version numbers, and generates random package names, which leads to the continuous republishing of these variants. This behavior not only pollutes the npm registry but also compromises the security and reliability of the packages within the ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hard_crocodile_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, avoid using the 'hard_crocodile_z3n' package and consider using alternative packages that provide similar functionality without the associated risks. Regularly audit your dependencies to ensure they are secure.
Conclusion
The 'hard_crocodile_z3n' package poses a significant threat to the npm ecosystem due to its malicious behavior of modifying package metadata and flooding the registry with derivative packages. It is crucial for developers to remain vigilant, regularly audit their dependencies, and utilize tools like Vulert to monitor for vulnerabilities.
See every vulnerability recorded for hard_crocodile_z3n →
FAQ
It is a malicious npm package that is part of a campaign to inflate developer reputation scores through the creation of numerous derivative packages.
The vulnerability can lead to the pollution of the npm registry, compromising the integrity of your project's dependencies and potentially introducing security risks.
You should uninstall the 'hard_crocodile_z3n' package immediately using 'npm uninstall hard_crocodile_z3n' and audit your project for any other malicious packages.
Yes, tools like Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just the package-lock.json file.
You can use the Vulert playground at Vulert Scanner to check if your application is affected without requiring any signup.