Malicious Code Injection in hanafi-tempe40-ruro: npm Package Vulnerability
Summary
MAL-2025-103564: Malicious code in hanafi-tempe40-ruro (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 package 'hanafi-tempe40-ruro' is part of the npm ecosystem, which is widely used for JavaScript package management. This package is associated with the tea.xyz token reward campaign, which has been known to flood the npm registry with malicious packages. Its primary function is to facilitate the distribution of JavaScript code, but it has been compromised to include harmful scripts that manipulate package metadata.
Vulnerability Detail
The vulnerability originates from the presence of malicious code within the 'hanafi-tempe40-ruro' package. This code is designed to automatically modify the package.json file by removing private flags, altering version numbers, and generating random package names. The malicious payload continuously republishes these variants, which can lead to pollution of the npm registry and potential exploitation by attackers. This poses significant risks to developers who may unknowingly use these compromised packages, leading to reputational damage and security breaches.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hanafi-tempe40-ruro
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 'hanafi-tempe40-ruro' package and look for alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your project for any changes in the package-lock.json file to detect unauthorized modifications.
Conclusion
The 'hanafi-tempe40-ruro' package has been identified as containing malicious code that poses significant risks to developers and their projects. It is essential to take immediate action to remove this package and monitor for any further vulnerabilities. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for hanafi-tempe40-ruro →
FAQ
It is an npm package that has been compromised to include malicious code aimed at manipulating package metadata.
You can use Vulert, which monitors your package-lock.json file for vulnerabilities. Visit Vulert Scanner to check if your application is affected without needing to sign up.
You should uninstall the package immediately using 'npm uninstall hanafi-tempe40-ruro' and look for alternatives.
Yes, using compromised packages can lead to security vulnerabilities, data breaches, and damage to your project's reputation.
Regularly audit your dependencies, use tools like Vulert for real-time monitoring, and stay updated on security advisories related to the packages you use.