Malicious Code Injection in glamorous_elephant_z3n: A Threat to npm Packages
Summary
MAL-2025-103268: Malicious code in glamorous_elephant_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 glamorous_elephant_z3n is part of a series of npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. The malicious nature of this package lies in its ability to modify critical files and republish variants, thereby polluting the npm registry.
Vulnerability Detail
The vulnerability in glamorous_elephant_z3n originates from its inclusion in a campaign that utilizes autopublish scripts to manipulate package.json files. This manipulation removes private flags, alters version numbers, and generates random package names, leading to potential security risks such as unauthorized access and reputation damage for developers. The continuous republishing of these variants can clutter the npm registry, making it difficult for legitimate packages to be discovered.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall glamorous_elephant_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, you can prevent the installation of this malicious package by using npm's package-lock.json to monitor your dependencies. Ensure that your project does not include glamorous_elephant_z3n in its dependencies. You can also use the following command to audit your packages: npm audit.
Conclusion
The glamorous_elephant_z3n package poses a significant threat due to its malicious code designed to manipulate package files and republish variants. It is crucial for developers to remove this package from their projects and utilize tools like Vulert to monitor for vulnerabilities. Staying informed and proactive can help mitigate risks associated with open-source dependencies.
See every vulnerability recorded for glamorous_elephant_z3n →
FAQ
glamorous_elephant_z3n is an npm package that is part of a malicious campaign aimed at inflating developer reputation scores through the automatic generation and publication of derivative packages.
The vulnerability can lead to unauthorized modifications of your package.json file, potential security risks, and cluttering of the npm registry, which may affect the discoverability of legitimate packages.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By simply using your package-lock.json file, you can check for vulnerabilities without needing to install any software.
If you find glamorous_elephant_z3n in your dependencies, you should remove it immediately and ensure that your project is not affected by any malicious code.
To prevent future vulnerabilities, regularly audit your dependencies, keep your packages updated, and use tools like Vulert to monitor for vulnerabilities in real-time.