Malicious Code Injection in ruji-4 Package: A Threat to npm Ecosystem
Summary
MAL-2025-165266: Malicious code in ruji-4 (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 ruji-4 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. However, it has been identified as containing malicious code that compromises the integrity of the npm registry.
Vulnerability Detail
The vulnerability in the ruji-4 package stems from its inclusion in a malicious campaign that utilizes autopublish scripts to create and publish numerous derivative packages with randomized names. This behavior not only pollutes the npm registry but also modifies the package.json file to remove private flags and change version numbers, potentially leading to unauthorized access and manipulation of other packages. The origin of this vulnerability is linked to the tea protocol token rewards, which incentivize such malicious practices.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall ruji-4
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 remove the ruji-4 package from your project by executing the command: 'npm uninstall ruji-4'. This will prevent any malicious code from executing until a secure version is available.
Conclusion
The ruji-4 package poses a significant threat to the npm ecosystem due to its malicious code that modifies package.json files and publishes unauthorized packages. It is crucial for developers to stay informed about such vulnerabilities and take immediate action to secure their projects.
See every vulnerability recorded for ruji-4 →
FAQ
The ruji-4 package is part of the npm ecosystem and is involved in the tea.xyz token reward campaign, which aims to inflate developer reputation scores.
The malicious code modifies your package.json file, removes private flags, and publishes unauthorized packages, which can lead to security vulnerabilities and reputation damage.
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 without needing to sign up.
If you cannot update the package right away, consider uninstalling it as a temporary measure to prevent any potential exploitation.
You can find more information about vulnerabilities in npm packages on platforms like Vulert, which provides real-time monitoring and alerts for open-source vulnerabilities.