Malicious Code Injection in heavy_egret_z3n Package: A Threat to npm Ecosystem
Summary
MAL-2025-103630: Malicious code in heavy_egret_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 heavy_egret_z3n package is part of the npm ecosystem, which is widely used for JavaScript package management. This package, like many others, is intended to facilitate the development of applications by providing reusable code. However, it has been identified as part of a malicious campaign that floods the npm registry with harmful packages, potentially compromising the integrity of projects that depend on it.
Vulnerability Detail
The vulnerability in the heavy_egret_z3n package originates from its association with the tea.xyz token reward campaign. This campaign has led to the creation of numerous packages that contain scripts designed to automatically publish derivative packages with altered names and contents. The malicious payload modifies the package.json file by removing private flags, changing version numbers, and generating random package names, which can lead to pollution of the npm registry and inflate developer reputation scores fraudulently. This can result in developers unknowingly using compromised packages, leading to security risks in their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall heavy_egret_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 the heavy_egret_z3n package and look for alternative packages that provide similar functionality without the associated risks. Additionally, consider using tools like Vulert to monitor your project for vulnerabilities. You can check if your application is affected by this vulnerability using the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The heavy_egret_z3n package poses a significant security risk due to its malicious code designed to manipulate the npm registry. It is crucial for developers to be aware of this vulnerability, take immediate action to remove the affected package, and utilize tools like Vulert for ongoing monitoring of their projects.
See every vulnerability recorded for heavy_egret_z3n →
FAQ
heavy_egret_z3n is an npm package that has been identified as part of a malicious campaign to flood the npm registry with harmful packages.
If your application depends on the heavy_egret_z3n package, it may be at risk of using compromised code that can lead to security vulnerabilities.
You should uninstall the heavy_egret_z3n package immediately using the command npm uninstall heavy_egret_z3n.
Yes, tools like Vulert can help monitor your project for open-source vulnerabilities in real-time using just your package-lock.json.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.