Malicious Code Injection in dangdungtea Package: A Threat to npm Users
Summary
MAL-2025-97681: Malicious code in dangdungtea (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 dangdungtea package is part of the tea.xyz token reward campaign that has recently infiltrated the npm ecosystem. This package is designed to facilitate token rewards through the automatic generation and publication of derivative packages. It modifies package metadata and inflates developer reputation scores, posing significant risks to users and the integrity of the npm registry.
Vulnerability Detail
The vulnerability in the dangdungtea package stems from its malicious code, which includes autopublish scripts that automatically generate and publish numerous derivative packages with randomized names. This behavior not only inflates developer reputation scores for the tea protocol token rewards but also modifies the package.json file to remove private flags and change version numbers. The continuous republishing of these variants leads to pollution of the npm registry, potentially compromising the security and reliability of other packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall dangdungtea
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
Currently, the best workaround is to avoid using the dangdungtea package altogether. If you have already installed it, remove it from your project as mentioned above. Additionally, consider using alternative packages that do not exhibit malicious behavior.
Conclusion
The dangdungtea package poses a significant threat to npm users due to its malicious code that modifies package metadata and floods the npm registry with derivative packages. It is crucial to remove this package from your projects and monitor for any vulnerabilities using tools like Vulert.
See every vulnerability recorded for dangdungtea →
FAQ
The dangdungtea package is part of a token reward campaign that automates the generation and publication of derivative npm packages.
The vulnerability can lead to the pollution of the npm registry, potentially compromising the security of your project and other packages.
You should uninstall the dangdungtea package immediately using 'npm uninstall dangdungtea' and check for any dependencies that may be affected.
Currently, there is no patched version available. The best course of action is to remove the package from your project.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json. You can check your application for vulnerabilities using the Vulert playground at Vulert Scanner without needing to sign up.