Malicious Code Injection in napoleon-teadev Package: A Threat to npm Users
Summary
MAL-2025-106178: Malicious code in napoleon-teadev (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 napoleon-teadev package is part of the tea.xyz token reward campaign, which has been associated with a surge of malicious packages on npm. This package is designed to facilitate the generation and publication of derivative packages, often with randomized names, to manipulate developer reputation scores for token rewards. Its functionality is compromised by the presence of malicious scripts that can alter package metadata.
Vulnerability Detail
The vulnerability stems from malicious code embedded within the napoleon-teadev package. This code modifies the package.json file to remove private flags, alters version numbers, and generates random package names, ultimately leading to the continuous republishing of these variants. This behavior not only pollutes the npm registry but also poses a risk to developers who may unknowingly install these compromised packages, potentially leading to further exploitation or data breaches.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall napoleon-teadev
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, users can avoid using the napoleon-teadev package altogether. If it is already in use, consider removing it from your project by executing: npm uninstall napoleon-teadev. Additionally, monitor your package-lock.json file for any unauthorized changes.
Conclusion
The napoleon-teadev package poses a significant security risk due to embedded malicious code that alters package metadata and repackages it. Users are urged to update or uninstall the package and utilize tools like Vulert for ongoing vulnerability monitoring.
See every vulnerability recorded for napoleon-teadev →
FAQ
The vulnerability involves malicious code that alters package metadata and repackages it, leading to potential exploitation.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.
You should uninstall the package immediately and check for any unauthorized changes in your project files.
While specific exploits have not been detailed, the modification of package.json can lead to further security risks, including unauthorized access to sensitive data.
Regularly audit your dependencies, use tools like Vulert for real-time monitoring, and stay updated on security advisories related to your packages.