Malicious Code Injection in tealove-nanami22: A Threat to npm Packages
Summary
MAL-2025-168451: Malicious code in tealove-nanami22 (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-nanami22 is part of the tea.xyz token reward campaign, which has been associated with a surge of malicious npm packages. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. This behavior not only clutters the npm registry but also poses significant security risks to users who may unknowingly install these compromised packages.
Vulnerability Detail
The vulnerability in tealove-nanami22 originates from its malicious payload, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This allows the package to continuously republish variants, polluting the npm registry and potentially leading to the installation of compromised versions by unsuspecting developers. The presence of autopublish scripts further automates this malicious behavior, making it a significant threat to the integrity of the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall tealove-nanami22
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, avoid using tealove-nanami22 and any other packages associated with the tea.xyz token reward campaign. Regularly audit your project's dependencies to identify and remove any potentially malicious packages.
Conclusion
The tealove-nanami22 package poses a significant security risk due to its malicious code designed to manipulate npm package publishing. Users are urged to remove this package and any related dependencies from their projects. Regular audits and the use of monitoring tools like Vulert can help maintain the security of your software.
See every vulnerability recorded for tealove-nanami22 →
FAQ
tealove-nanami22 is an npm package that is part of a malicious campaign to inflate developer reputation scores through the automatic generation of derivative packages.
The vulnerability can lead to the installation of compromised packages, which may contain malicious code that can harm your project or compromise sensitive data.
You should immediately uninstall the package using npm uninstall tealove-nanami22 and audit your project for any other potentially malicious dependencies.
You can use tools like Vulert, which monitors your package-lock.json for open-source vulnerabilities in real-time. You can check your application for vulnerabilities using the Vulert playground without any signup.
Yes, there are multiple packages associated with the tea.xyz token reward campaign that may exhibit similar malicious behaviors. It is advisable to review your dependencies regularly.