Malicious Code Injection in direct_dragonfly_z3n Package
Summary
MAL-2025-98680: Malicious code in direct_dragonfly_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 direct_dragonfly_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 generation and publication of derivative packages, often with randomized names, to inflate developer reputation scores. However, it has been identified as containing malicious code that compromises the integrity of the npm registry.
Vulnerability Detail
The vulnerability originates from the malicious code embedded within the direct_dragonfly_z3n package. This code modifies the package.json file to remove private flags, alters version numbers, and generates random package names, leading to the continuous republishing of variants. This behavior not only pollutes the npm registry but also poses a risk to developers who may unknowingly use these compromised packages, potentially leading to further exploitation or data breaches.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall direct_dragonfly_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 remove the direct_dragonfly_z3n package from your project by executing the following command: npm uninstall direct_dragonfly_z3n. This will prevent any malicious code from executing until a safe version is available.
Conclusion
The direct_dragonfly_z3n package has been identified as containing malicious code that compromises 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 to monitor for future vulnerabilities.
See every vulnerability recorded for direct_dragonfly_z3n →
FAQ
It is an npm package associated with the tea.xyz token reward campaign, designed to generate and publish derivative packages.
The malicious code modifies your package.json file and can lead to the publication of compromised packages, affecting your project's integrity.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application using the Vulert playground without any signup.
You should uninstall the package immediately and check for any updates or patches that may be released.
Regularly monitor your dependencies using tools like Vulert and ensure you only install packages from trusted sources.