Malicious Code Injection in hassanescargot Package - npm Vulnerability
Summary
MAL-2025-171301: Malicious code in hassanescargot (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 hassanescargot package is part of the npm ecosystem, primarily used for various JavaScript applications. It is often leveraged by developers to manage dependencies and streamline the development process. However, this package has been identified as part of a malicious campaign that exploits npm's publishing mechanisms, leading to significant security risks for users.
Vulnerability Detail
The vulnerability in the hassanescargot package originates from its association with the tea.xyz token reward campaign, which has been flooding the npm registry with malicious packages. These packages contain scripts designed to automatically generate and publish derivative packages with randomized names, thereby inflating developer reputation scores for token rewards. The malicious payload modifies the package.json file by removing private flags, changing version numbers, and continuously republishing variants, which pollutes the npm registry and can lead to unintentional dependency on compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hassanescargot
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 hassanescargot package and look for alternative packages that provide similar functionality without the associated risks. Always verify the integrity and reputation of packages before including them in your project.
Conclusion
The hassanescargot package poses a significant security risk due to its malicious code injection vulnerability. It is essential for developers to remove this package from their projects and to monitor their dependencies for any potential vulnerabilities. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for hassanescargot →
FAQ
The hassanescargot package is an npm package used in JavaScript applications, but it has been identified as part of a malicious campaign.
The vulnerability can lead to the injection of malicious code, which may compromise your application's security and integrity.
You should uninstall the hassanescargot package immediately and check your application for any potential security issues.
You can use tools like Vulert, which monitors your package-lock.json for open-source vulnerabilities in real-time without requiring code access.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.