Malicious Code Injection in legislative_firefly_z3n Package
Summary
MAL-2025-95217: Malicious code in legislative_firefly_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 legislative_firefly_z3n package is part of the npm ecosystem, typically used for various JavaScript applications. It is associated with the tea.xyz token reward campaign, which has been known to flood the npm registry with packages designed to inflate developer reputation scores. This package, like others in the campaign, has been compromised to include malicious scripts that can alter its functionality and impact the integrity of applications relying on it.
Vulnerability Detail
The vulnerability in the legislative_firefly_z3n package stems from its inclusion in a malicious campaign that modifies the package.json file to remove private flags and change version numbers. This allows the package to continuously republish itself under random names, polluting the npm registry and potentially leading to security risks for developers who unknowingly use these compromised packages. The malicious payload is designed to generate derivative packages with randomized names, which can mislead users and inflate the reputation of the malicious actors behind the campaign.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall legislative_firefly_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 manually remove the legislative_firefly_z3n package from your project by executing the following command: npm uninstall legislative_firefly_z3n. Additionally, consider using tools like Vulert to monitor your project for vulnerabilities in real-time.
Conclusion
The legislative_firefly_z3n package poses a significant security risk due to its malicious code injection. It is crucial for developers to be vigilant and remove this package from their projects. Utilizing tools like Vulert can help in monitoring for such vulnerabilities in real-time, ensuring the safety and integrity of applications.
See every vulnerability recorded for legislative_firefly_z3n →
FAQ
It is an npm package that is part of a campaign to inflate developer reputation scores through the creation of numerous derivative packages.
The vulnerability can lead to the inclusion of malicious code in your application, potentially compromising its security and integrity.
You should uninstall the legislative_firefly_z3n package immediately and monitor your project for any further vulnerabilities.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
Vulert monitors and alerts for open-source vulnerabilities in your software using just the package-lock.json file, providing real-time insights into potential risks.