Malicious Code Injection in hanafi-sasag79-ruro: A Threat to npm Users
Summary
MAL-2025-103558: Malicious code in hanafi-sasag79-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-sasag79-ruro' is part of a series of npm packages associated with the tea.xyz token reward campaign. These packages are designed to inflate developer reputation scores through the automatic generation and publishing of derivative packages. The malicious nature of this package lies in its ability to modify critical files and republish variants, thereby polluting the npm registry.
Vulnerability Detail
The vulnerability in 'hanafi-sasag79-ruro' originates from its inclusion in a malicious campaign that employs scripts to alter package.json files. This includes removing private flags, changing version numbers, and generating random package names. The ramifications of this vulnerability are significant, as it can lead to the proliferation of untrustworthy packages in the npm ecosystem, potentially compromising the integrity of applications that depend on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hanafi-sasag79-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 measure, you can avoid using the affected package and replace it with a known secure alternative. Always verify the integrity and source of packages before including them in your project.
Conclusion
The 'hanafi-sasag79-ruro' package poses a significant threat due to its malicious code designed to manipulate npm packages. Users are advised to uninstall this package and utilize tools like Vulert to monitor for vulnerabilities in their applications. Maintaining vigilance and using trusted packages is crucial for safeguarding your projects.
See every vulnerability recorded for hanafi-sasag79-ruro →
FAQ
The main issue is that it contains malicious code that modifies package.json files and repopulates the npm registry with untrustworthy packages.
You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected.
If you have installed the package, you should uninstall it immediately using the command 'npm uninstall hanafi-sasag79-ruro' and review your dependencies for any other malicious packages.
Yes, you should look for reputable packages that serve the same purpose but are verified and trusted within the community.
Regularly audit your dependencies, use tools like Vulert for real-time monitoring, and only install packages from trusted sources.