Malicious Code Injection in princess-teadev Package - npm Vulnerability
Summary
MAL-2025-107273: Malicious code in princess-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 princess-teadev package is part of the tea.xyz token reward campaign, which has been known to flood the npm registry with malicious packages. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. This behavior poses a significant risk to developers and users relying on the integrity of npm packages.
Vulnerability Detail
The vulnerability originates from malicious code embedded within the princess-teadev package. This code modifies the package.json file to remove private flags, alters version numbers, and generates random package names, leading to the continuous republishing of variants. This not only pollutes the npm registry but also compromises the security and reliability of applications that depend on these packages. The malicious payload can potentially lead to unauthorized access and exploitation of systems using affected packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall princess-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, you can avoid using the princess-teadev package and look for alternative packages that provide similar functionality without the associated risks. Always verify the integrity of packages before installation.
Conclusion
The princess-teadev package contains malicious code that poses a significant risk to developers and users. It is essential to remove this package from your projects and monitor for any similar vulnerabilities in the future. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for princess-teadev →
FAQ
The princess-teadev package is part of a malicious campaign that aims to inflate developer reputation scores in the npm registry.
The malicious code modifies package.json files, removes private flags, and continuously republishes variants, which can lead to security vulnerabilities in your application.
You should uninstall the princess-teadev package immediately using the command: npm uninstall princess-teadev.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just package-lock.json.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.