Malicious Code Injection in elegant_gecko_z3n: A Threat to npm Packages
Summary
MAL-2025-102036: Malicious code in elegant_gecko_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 'elegant_gecko_z3n' is part of a series of npm packages associated with the tea.xyz token reward campaign. These packages are designed to manipulate the npm registry by automatically generating and publishing derivative packages with randomized names. This behavior aims to inflate developer reputation scores for rewards related to the tea protocol, making it a significant concern for developers relying on npm for package management.
Vulnerability Detail
The vulnerability in 'elegant_gecko_z3n' stems from its malicious payload that modifies the package.json file. It removes private flags, alters version numbers, and generates random package names, which leads to the continuous republishing of variants. This not only pollutes the npm registry but also poses risks such as unintentional use of compromised packages and potential security breaches in applications that depend on these packages. The origin of this issue is linked to the broader trend of malicious packages flooding the npm ecosystem, particularly those tied to token reward schemes.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall elegant_gecko_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 prevent the installation of this package by using the following command to uninstall it: npm uninstall elegant_gecko_z3n. Additionally, consider using a tool like Vulert to monitor your package-lock.json for vulnerabilities in real-time.
Conclusion
The 'elegant_gecko_z3n' package poses a significant threat due to its malicious code that alters package metadata and floods the npm registry. Developers should take immediate action to remove this package and utilize tools like Vulert for ongoing monitoring of vulnerabilities in their projects.
See every vulnerability recorded for elegant_gecko_z3n →
FAQ
'elegant_gecko_z3n' is an npm package linked to a token reward campaign that generates and publishes malicious derivative packages.
The vulnerability can lead to the installation of compromised packages, which may introduce security risks and affect the integrity of your application.
You should uninstall 'elegant_gecko_z3n' immediately and monitor your application for any unusual behavior.
Yes, regularly audit your dependencies and use tools like Vulert to monitor your package-lock.json for vulnerabilities.
Yes, you can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without any signup.