Malicious Code Injection in cheerful_gorilla_z3n: A Threat to npm Packages
Summary
MAL-2025-100363: Malicious code in cheerful_gorilla_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
cheerful_gorilla_z3n is an npm package that appears to be part of a token reward campaign associated with the tea.xyz protocol. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores. However, it has been identified as containing malicious code that compromises the integrity of the npm registry.
Vulnerability Detail
The vulnerability in cheerful_gorilla_z3n originates from its association with a campaign that floods the npm registry with malicious packages. The malicious payload modifies the package.json file to remove private flags, alters version numbers, and generates random package names, leading to the continuous republishing of these variants. This not only pollutes the npm registry but also poses a risk to developers who may unknowingly use these compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall cheerful_gorilla_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 cheerful_gorilla_z3n and any packages that may have been published as part of the same campaign. Monitor your package dependencies closely and consider using tools like Vulert to check for vulnerabilities in your project.
Conclusion
The cheerful_gorilla_z3n package poses a significant risk due to its malicious code that alters package metadata and floods the npm registry. It is essential to remove this package from your projects and monitor your dependencies for vulnerabilities to maintain the security of your applications.
See every vulnerability recorded for cheerful_gorilla_z3n →
FAQ
cheerful_gorilla_z3n is an npm package involved in a token reward campaign that has been identified as containing malicious code.
The malicious code modifies your package.json file, removes private flags, and generates random package names, which can lead to the pollution of the npm registry and potential security risks.
You should uninstall the package immediately using the command npm uninstall cheerful_gorilla_z3n and check your project for any other compromised packages.
You can use tools like Vulert, which monitors your package-lock.json for open-source vulnerabilities in real-time. You can also check your application using the Vulert playground without any signup.
There are no patches available for cheerful_gorilla_z3n. The best course of action is to remove the package and ensure your dependencies are secure.