Malicious Code Injection in rita-6 Package: A Threat to npm Users
Summary
MAL-2025-164933: Malicious code in rita-6 (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-6 package is part of the npm ecosystem, primarily used for various JavaScript functionalities. However, it has been identified as part of a malicious campaign that floods the npm registry with harmful packages. This package, like others in the campaign, contains scripts that manipulate package metadata and publish unauthorized versions, posing significant risks to developers and users alike.
Vulnerability Detail
The vulnerability in the rita-6 package stems from its involvement in the tea.xyz token reward campaign, which aims to inflate developer reputation scores through the automatic generation and publication of derivative packages. The malicious code modifies the package.json file to remove private flags, alters version numbers, and creates random package names. This results in the pollution of the npm registry and can lead to unintended consequences for developers who unknowingly use these compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall rita-6
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, consider using alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your project for vulnerabilities using tools like Vulert, which analyzes your package-lock.json file to alert you of any open-source vulnerabilities in real-time.
Conclusion
The rita-6 package poses a significant security risk due to its malicious code that alters package metadata and floods the npm registry with compromised versions. It is crucial for developers to remove this package and monitor their projects for vulnerabilities to ensure the integrity and security of their applications.
See every vulnerability recorded for rita-6 →
FAQ
The rita-6 package is a JavaScript library available on npm, but it has been identified as part of a malicious campaign that affects its integrity.
The vulnerability can lead to the injection of malicious code, which may compromise your project's security and integrity by polluting the npm registry.
You should uninstall the rita-6 package immediately and monitor your project for any signs of compromise.
Regularly audit your dependencies using tools like Vulert and stay updated on the latest security advisories for the packages you use.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.