Malicious Code Injection in tealove-nice31: A Threat to npm Packages
Summary
MAL-2025-168510: Malicious code in tealove-nice31 (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 tealove-nice31 is part of the tea.xyz token reward campaign, which has been known to flood the npm ecosystem with malicious packages. These packages are designed to inflate developer reputation scores through the automatic generation and publication of derivative packages. The functionality of tealove-nice31 is compromised, as it contains scripts that modify package metadata and republish variants, leading to pollution of the npm registry.
Vulnerability Detail
The vulnerability in tealove-nice31 stems from its malicious payload, which alters the package.json file by removing private flags and changing version numbers. It generates random package names, often themed around Indonesian culture, and continuously republishes these variants. This behavior not only compromises the integrity of the npm registry but also poses risks to developers who may unknowingly use these tainted packages, potentially leading to security breaches and loss of trust in the ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall tealove-nice31
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 avoid using the tealove-nice31 package and replace it with a trusted alternative. Additionally, consider using npm audit to scan your project for vulnerabilities and address any issues that arise.
Conclusion
The tealove-nice31 package poses a significant threat due to its malicious code that alters package metadata and repopulates the npm registry with potentially harmful variants. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities to maintain the security of their projects.
See every vulnerability recorded for tealove-nice31 →
FAQ
Tealove-nice31 is an npm package that is part of a malicious campaign aimed at inflating developer reputation scores through the automatic generation of derivative packages.
The vulnerability can lead to the inclusion of malicious code in your project, potentially compromising its security and integrity.
You should immediately remove the package from your project and check for any other affected packages using npm audit.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just package-lock.json. You can check your application for vulnerabilities without any signup at the Vulert playground.
Regularly audit your dependencies, keep them updated, and use tools like Vulert to monitor for vulnerabilities in real-time.