Malicious Code Injection in middle_planarian_z3n Package: A Threat to npm Users
Summary
MAL-2025-95466: Malicious code in middle_planarian_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 middle_planarian_z3n package is part of a series of npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to automate the publication of derivative packages, often with randomized names, to inflate developer reputation scores for token rewards. This behavior raises significant concerns regarding the integrity and security of the npm ecosystem.
Vulnerability Detail
The vulnerability in the middle_planarian_z3n package stems from its malicious code that modifies the package.json file. This code removes private flags, alters version numbers, and generates random package names, leading to the continuous republishing of variants that pollute the npm registry. The origin of this vulnerability is linked to the tea.xyz token reward campaign, which exploits npm's publishing mechanisms to manipulate developer reputation scores. The ramifications include potential security risks for users who inadvertently install these malicious packages, as they may introduce unwanted behavior or compromise the integrity of their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall middle_planarian_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, users can avoid using the middle_planarian_z3n package and any other packages associated with the tea.xyz token reward campaign. Additionally, users can monitor their package-lock.json file for any unauthorized changes and revert them if necessary.
Conclusion
The middle_planarian_z3n package presents a significant security threat due to its malicious code that alters package metadata and repopulates the npm registry with harmful variants. Users are advised to update or remove the package and utilize tools like Vulert to monitor their projects for vulnerabilities.
See every vulnerability recorded for middle_planarian_z3n →
FAQ
The middle_planarian_z3n package is an npm package that is part of a malicious campaign aimed at inflating developer reputation scores through automated publishing of derivative packages.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By checking your package-lock.json file, you can identify if your application is affected by this vulnerability.
Using the middle_planarian_z3n package poses risks such as the introduction of malicious code, potential data breaches, and the compromise of application integrity.
To prevent similar vulnerabilities, it is essential to regularly audit your dependencies, use trusted packages, and monitor for updates and security advisories.
If you have installed the middle_planarian_z3n package, you should remove it from your project and check for any unauthorized changes in your package.json and package-lock.json files.