Malicious Code Injection in Permanent Dragonfly Z3N Package
Summary
MAL-2025-89459: Malicious code in permanent_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 'permanent_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 automatic generation and publication of derivative packages, often with randomized names. It aims to inflate developer reputation scores for rewards associated with the tea protocol. However, it has been identified as containing malicious code that compromises its integrity and the npm registry.
Vulnerability Detail
The vulnerability originates from the package's malicious payload, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior leads to the continuous republishing of variants that pollute the npm registry, potentially affecting other developers and users by introducing untrusted packages into the ecosystem. The malicious scripts (auto.js, autopublish.js, etc.) are specifically designed to automate this harmful process.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall permanent_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 measure, you can prevent the installation of this malicious package by using npm's package-lock.json to monitor dependencies. Ensure that your project does not include 'permanent_dragonfly_z3n' in its dependencies. You can also utilize tools like Vulert to monitor your project for vulnerabilities in real-time.
Conclusion
The 'permanent_dragonfly_z3n' package has been identified as containing malicious code that compromises the integrity of the npm registry. It is crucial for developers to remove this package and monitor their projects for vulnerabilities using tools like Vulert. Staying vigilant and proactive can help mitigate the risks associated with such vulnerabilities.
See every vulnerability recorded for permanent_dragonfly_z3n →
FAQ
The malicious code can lead to the pollution of the npm registry, affecting other developers by introducing untrusted packages and potentially compromising their applications.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
If you have installed the package, you should uninstall it immediately using 'npm uninstall permanent_dragonfly_z3n' and check your project for any other affected dependencies.
Currently, there is no patched version available for the 'permanent_dragonfly_z3n' package. It is recommended to remove the package entirely.
Vulert uses your package-lock.json to monitor and alert in real-time for open-source vulnerabilities in your software, ensuring you stay informed about potential risks.