Malicious Code Injection in hanafi-kepok13-ruro: A Threat to npm Ecosystem
Summary
MAL-2025-103533: Malicious code in hanafi-kepok13-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-kepok13-ruro' 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 'hanafi-kepok13-ruro' 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 that pollute the npm registry. This can result in significant ramifications, including the potential for developers to unknowingly install compromised packages, leading to security breaches and loss of trust in the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hanafi-kepok13-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-kepok13-ruro' package and instead look for alternative packages that provide similar functionality without the associated risks. Additionally, consider using npm audit to check for vulnerabilities in your dependencies.
Conclusion
The 'hanafi-kepok13-ruro' package poses a significant risk due to its malicious code that alters package.json and repopulates the npm registry with compromised packages. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities to maintain the security of their applications.
See every vulnerability recorded for hanafi-kepok13-ruro →
FAQ
The main issue is the presence of malicious code that modifies package.json and republish variants, which can lead to security vulnerabilities.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.
If you have installed the package, you should uninstall it immediately using 'npm uninstall hanafi-kepok13-ruro' and look for alternatives.
Yes, the malicious code can lead to the installation of compromised packages, which may result in unauthorized access or data breaches.
Regularly audit your dependencies using tools like npm audit, and consider using services like Vulert to monitor for vulnerabilities in real-time.