Malicious Code Injection in ruji-40 Package: A Threat to npm Ecosystem
Summary
MAL-2025-165267: Malicious code in ruji-40 (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-40 package 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. These packages often contain scripts designed to manipulate the npm registry and inflate developer reputation scores through automated publishing of derivative packages.
Vulnerability Detail
The vulnerability in the ruji-40 package stems from its inclusion in a malicious campaign that modifies the package.json file to remove private flags and alters version numbers. It generates random package names, often themed around Indonesian culture, and continuously republishes these variants to pollute the npm registry. This behavior can lead to a compromised development environment, where developers may unknowingly install malicious packages, exposing their applications to security risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall ruji-40
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 monitor your package dependencies using tools like Vulert. By utilizing Vulert, you can check if your application is affected by this vulnerability without requiring access to the code or installation. You can use the Vulert playground at https://vulert.com/scanner to analyze your package-lock.json file for vulnerabilities.
Conclusion
The ruji-40 package poses a significant risk to the npm ecosystem due to its malicious behavior of modifying package metadata and republishing variants. It is crucial for developers to be aware of such vulnerabilities and take proactive measures to secure their applications by removing affected packages and utilizing monitoring tools like Vulert.
See every vulnerability recorded for ruji-40 →
FAQ
The ruji-40 package is an npm package that is part of a malicious campaign aimed at inflating developer reputation scores through automated publishing of derivative packages.
The vulnerability can lead to the installation of malicious packages, compromising your application's security and potentially exposing sensitive data.
You should immediately uninstall the ruji-40 package using 'npm uninstall ruji-40' and review your other dependencies for any potential vulnerabilities.
Regularly update your dependencies, use trusted packages, and monitor your project with tools like Vulert to stay informed about vulnerabilities.
Vulert is a tool that monitors and alerts for open-source vulnerabilities in your software by analyzing your package-lock.json file. You can use it to check for vulnerabilities without needing to sign up.