Malicious Code Injection in dhrafortea Package: A Threat to npm Users
Summary
MAL-2025-97701: Malicious code in dhrafortea (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 dhrafortea package is part of the tea.xyz token reward campaign, which has been known to flood the npm ecosystem with malicious packages. These packages are designed to manipulate developer reputation scores by automatically generating and publishing derivative packages with randomized names. The primary functionality of dhrafortea is to serve as a token reward mechanism, but its malicious behavior compromises the integrity of the npm registry.
Vulnerability Detail
The vulnerability in the dhrafortea package stems from its inclusion in a campaign that employs autopublish scripts to modify package.json files. These scripts remove private flags, alter version numbers, and generate random package names, leading to the continuous republishing of variants that pollute the npm registry. This not only affects the reputation of developers but also poses a risk to users who may unknowingly install compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall dhrafortea
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 dhrafortea package until a patched version is released. Additionally, consider using alternative packages that do not exhibit malicious behavior.
Conclusion
The dhrafortea package poses a significant risk due to its malicious code that alters package metadata and floods the npm registry. Users are advised to update their packages and monitor their applications for vulnerabilities to maintain security.
See every vulnerability recorded for dhrafortea →
FAQ
The dhrafortea package is part of a token reward campaign that has been associated with malicious activities in the npm ecosystem.
The vulnerability can lead to the installation of compromised packages, which may alter your application's behavior and compromise security.
If you have installed dhrafortea, you should remove it and update to a patched version or use an alternative package.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.