Malicious Code Injection in rival-poke20: A Threat to npm Users
Summary
MAL-2025-165001: Malicious code in rival-poke20 (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 'rival-poke20' 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. The primary function of such packages is to inflate developer reputation scores through the automatic generation and publishing of derivative packages.
Vulnerability Detail
The vulnerability in 'rival-poke20' stems from its malicious payload that modifies the package.json file by removing private flags, altering version numbers, and generating random package names. This behavior leads to the continuous republishing of variants, polluting the npm registry and potentially compromising the integrity of other packages. The source of this vulnerability is linked to the tea.xyz token reward campaign, which exploits npm's publishing mechanisms.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall rival-poke20
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 workaround, you can temporarily avoid using 'rival-poke20' and any packages that depend on it. Additionally, consider using npm audit to identify and address vulnerabilities in your project.
Conclusion
The 'rival-poke20' package poses a significant threat due to its malicious behavior, which can compromise the integrity of the npm registry and affect other packages. It is essential to remove this package and monitor your dependencies for vulnerabilities.
See every vulnerability recorded for rival-poke20 →
FAQ
The vulnerability involves malicious code that modifies package.json and repackages it under random names, leading to npm registry pollution.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application using the Vulert playground at Vulert Scanner.
Immediately remove the package from your project and check for any dependencies that may also be affected.
Regularly audit your dependencies using tools like npm audit and stay updated on the latest security advisories.
Using compromised packages can lead to data breaches, unauthorized access, and the spread of malicious code within your application.