Malicious Code Injection in hassanabdul Package: npm Vulnerability Alert
Summary
MAL-2025-171298: Malicious code in hassanabdul (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 hassanabdul 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, which can inflate developer reputation scores for token rewards. However, it has been identified as containing malicious code that compromises the integrity of the npm registry.
Vulnerability Detail
The vulnerability in the hassanabdul package originates from its design to include autopublish scripts that modify the package.json file. These modifications remove private flags, alter version numbers, and generate 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 install these compromised packages, potentially leading to further exploitation.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hassanabdul
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 hassanabdul package altogether. If it is already installed, you can uninstall it using the following command: npm uninstall hassanabdul.
Conclusion
The hassanabdul package presents a significant security risk due to its malicious code that modifies project files and repopulates the npm registry with compromised packages. It is crucial for developers to remove this package and monitor their projects for vulnerabilities.
See every vulnerability recorded for hassanabdul →
FAQ
The hassanabdul package is an npm package associated with the tea.xyz token reward campaign, designed to automate the generation and publication of packages.
The vulnerability can lead to the installation of malicious packages that may compromise your project's integrity and security.
You should uninstall the hassanabdul package immediately using the command: npm uninstall hassanabdul.
Currently, there is no patched version available for the hassanabdul package. It is advisable to remove it from your project.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file. You can check your application for vulnerabilities using the Vulert playground at Vulert Scanner.