Malicious Code Injection in royal_gerbil_pink-6: A Threat to npm Ecosystem
Summary
MAL-2025-108221: Malicious code in royal_gerbil_pink-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 package 'royal_gerbil_pink-6' is part of the npm ecosystem, which is widely used for JavaScript package management. It is designed to facilitate the development and sharing of code among developers. However, this package has been identified as part of a malicious campaign that floods the npm registry with derivative packages, aimed at inflating developer reputation scores for token rewards. This vulnerability poses a significant risk to developers and users relying on npm packages.
Vulnerability Detail
The vulnerability originates from the 'royal_gerbil_pink-6' package, which is linked to the tea.xyz token reward campaign. It contains malicious scripts that modify the package.json file by removing private flags, altering version numbers, and generating random package names. This leads to the continuous republishing of variants, polluting the npm registry and potentially compromising the integrity of other packages. The ramifications include loss of trust in the npm ecosystem and the risk of developers inadvertently using compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall royal_gerbil_pink-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 measure, avoid using the 'royal_gerbil_pink-6' package and consider using alternative packages that provide similar functionality without the associated risks. Additionally, regularly audit your npm packages using tools like npm audit to identify vulnerabilities.
Conclusion
The 'royal_gerbil_pink-6' package poses a significant threat to the npm ecosystem due to its malicious code that modifies package files and repopulates the registry with compromised versions. It is essential for developers to take immediate action by removing the package and monitoring their projects for vulnerabilities to maintain security and trust in the software supply chain.
See every vulnerability recorded for royal_gerbil_pink-6 →
FAQ
It is an npm package that has been identified as part of a malicious campaign aimed at inflating developer reputation scores.
The vulnerability can lead to the inclusion of malicious code in your project, compromising its integrity and security.
You should uninstall the package immediately and check for any other affected packages in your project.
You can use tools like Vulert, which monitors and alerts you in real-time for open-source vulnerabilities using just your package-lock.json.
Yes, you can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without any signup.