Malicious Code Injection in rita-40 Package: A Threat to npm Users
Summary
MAL-2025-164912: Malicious code in rita-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 rita-40 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 for token rewards. However, it has been identified as containing malicious scripts that compromise its integrity and the security of users.
Vulnerability Detail
The vulnerability in the rita-40 package originates from its association with a malicious campaign that floods the npm registry with derivative packages. The malicious payload alters the package.json file by removing private flags, changing version numbers, and generating random package names. This behavior not only pollutes the npm registry but also poses a risk to developers who may unknowingly use these compromised packages, leading to potential security breaches in their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall rita-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 remove the rita-40 package from your project if it is not essential. Use the following command to uninstall it: npm uninstall rita-40. This will prevent any potential exploitation of the vulnerability until a fix is applied.
Conclusion
The rita-40 package poses a significant security risk due to its malicious code injection vulnerability. It is essential for developers to be aware of this issue and take appropriate measures to protect their applications by updating or removing the affected package.
See every vulnerability recorded for rita-40 →
FAQ
The rita-40 package is an npm package associated with the tea.xyz token reward campaign, designed to automate the generation and publication of derivative packages.
The vulnerability can lead to the introduction of malicious code into your application, potentially compromising its security and integrity.
If you have used the rita-40 package, it is crucial to update it to the latest version or remove it from your project to avoid security risks.
Yes, you can use tools like Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software using just package-lock.json.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.