Malicious Code Injection in pitra-51: A Threat to npm Packages
Summary
MAL-2025-164323: Malicious code in pitra-51 (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 pitra-51 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 by automatically generating and publishing derivative packages with randomized names. The malicious behavior of pitra-51 includes modifying the package.json file to remove private flags, changing version numbers, and continuously republishing variants to pollute the npm registry.
Vulnerability Detail
The vulnerability in pitra-51 stems from its malicious code that modifies essential package metadata, allowing it to publish unauthorized versions of itself and other packages. This behavior can lead to a significant pollution of the npm registry, making it difficult for developers to trust the integrity of packages. The origin of this vulnerability is linked to the tea.xyz token reward campaign, which incentivizes the creation of such malicious packages. The technical aspects include the use of autopublish scripts that automate the generation of these malicious packages, compromising the security and reliability of the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall pitra-51
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
Currently, there are no specific workarounds to mitigate the effects of this vulnerability other than removing the affected package from your project. Ensure to monitor your dependencies regularly for any malicious packages.
Conclusion
The pitra-51 package poses a significant threat to the npm ecosystem due to its malicious behavior of modifying package metadata and republishing unauthorized versions. It is essential for developers to be vigilant and remove this package from their projects to maintain the integrity of their applications.
See every vulnerability recorded for pitra-51 →
FAQ
pitra-51 is an npm package that has been identified as malicious, part of a campaign to inflate developer reputation scores through the automatic generation of derivative packages.
The pitra-51 package can modify your project's package.json file, remove private flags, and publish unauthorized versions, leading to potential security risks and pollution of the npm registry.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If you have pitra-51 installed, you should uninstall it immediately using the command: npm uninstall pitra-51.
As of now, there are no patches available for pitra-51. The best course of action is to remove the package from your project.