Malicious Code Injection in Competitive Magpie Z3N: A Threat to npm Packages
Summary
MAL-2025-100761: Malicious code in competitive_magpie_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
Competitive Magpie Z3N is an npm package that is part of the tea.xyz token reward campaign. It is designed to facilitate token rewards for developers by generating and publishing derivative packages. However, this package has been identified as malicious, containing scripts that manipulate package metadata and flood the npm registry with unwanted variants.
Vulnerability Detail
The vulnerability originates from the malicious code embedded within the competitive_magpie_z3n package. This code is designed to modify the package.json file by removing private flags, altering version numbers, and generating random package names. The result is a pollution of the npm registry, which can lead to confusion among developers and potentially compromise the integrity of applications relying on these packages. The malicious payload can inflate developer reputation scores fraudulently, posing a significant risk to the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall competitive_magpie_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 competitive_magpie_z3n package altogether and look for alternative packages that provide similar functionality without the associated risks.
Conclusion
The competitive_magpie_z3n package poses a significant risk due to its malicious code designed to manipulate package metadata and flood the npm registry. It is crucial for developers to remove this package from their projects and monitor for any updates or alternative solutions. Utilizing tools like Vulert can help in identifying and managing such vulnerabilities effectively.
See every vulnerability recorded for competitive_magpie_z3n →
FAQ
Competitive_magpie_z3n is an npm package associated with the tea.xyz token reward campaign, designed to generate and publish derivative packages.
The malicious code modifies package metadata, potentially leading to the publication of unwanted package variants and compromising the integrity of your application.
You should uninstall the competitive_magpie_z3n package immediately using 'npm uninstall competitive_magpie_z3n' and check for alternative packages.
Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file. You can check your application for vulnerabilities using the Vulert playground without any signup.
You can find detailed information about this vulnerability in the official npm registry or by visiting the GitHub repository for malicious packages.