Malicious Code Injection in mid_gerbil_z3n Package - npm Vulnerability
Summary
MAL-2025-105819: Malicious code in mid_gerbil_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 mid_gerbil_z3n package is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores for token rewards. It is particularly vulnerable due to its inclusion of autopublish scripts that modify package metadata and republish malicious variants.
Vulnerability Detail
The vulnerability originates from the malicious code embedded within the mid_gerbil_z3n package. This code modifies the package.json file to remove private flags, alters version numbers, and generates random package names, leading to the pollution of the npm registry. The ramifications include potential security risks for developers who unknowingly use these compromised packages, as well as damage to the integrity of the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall mid_gerbil_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, avoid using the mid_gerbil_z3n package and monitor your project for any dependencies that may have been affected by this vulnerability. You can also utilize tools like Vulert to monitor your package-lock.json for vulnerabilities in real-time.
Conclusion
The mid_gerbil_z3n package poses a significant security risk due to its malicious code that modifies package metadata and repopulates the npm registry with compromised versions. It is crucial to uninstall this package and monitor your project for vulnerabilities using tools like Vulert.
See every vulnerability recorded for mid_gerbil_z3n →
FAQ
The mid_gerbil_z3n package is an npm package associated with the tea.xyz token reward campaign, designed to automate the publication of derivative packages.
The vulnerability can lead to the introduction of malicious code into your project, compromising its security and potentially affecting the integrity of the npm registry.
You should uninstall the mid_gerbil_z3n package immediately using 'npm uninstall mid_gerbil_z3n' and check your project for any other affected dependencies.
You can use tools like Vulert, which monitors your package-lock.json for open-source vulnerabilities in real-time without requiring code access or installation.
There is no patch available for the mid_gerbil_z3n package, so the best course of action is to remove it from your project.