Malicious Code Exploit in pitra-31 Package: npm Vulnerability Overview
Summary
MAL-2025-164301: Malicious code in pitra-31 (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 pitra-31 package is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. It is designed to facilitate the distribution of token rewards through various npm packages. However, this package has been identified as containing malicious code that compromises its integrity and the security of the npm registry.
Vulnerability Detail
The vulnerability in the pitra-31 package originates from its design to include autopublish scripts that automatically generate and publish derivative packages with randomized names. This behavior is intended to inflate developer reputation scores for rewards. The malicious payload modifies the package.json file by removing private flags, altering version numbers, and creating random package names, which leads to pollution of the npm registry and potential exploitation of developers relying on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall pitra-31
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 pitra-31 package and instead look for alternative packages that provide similar functionality without the associated risks.
Conclusion
The pitra-31 package poses a significant security risk due to its malicious code designed to manipulate npm registry data. It is crucial for developers to remove this package and stay informed about potential updates or patches to maintain the integrity of their applications.
See every vulnerability recorded for pitra-31 →
FAQ
The pitra-31 package is an npm package associated with the tea.xyz token reward campaign, designed to facilitate token distribution.
The vulnerability can lead to the modification of your package.json file, potentially exposing your application to further risks and pollution of the npm registry.
You should immediately remove the pitra-31 package from your project and monitor for any updates or patches.
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 using the Vulert playground.
You can find detailed information about this vulnerability in the official npm registry or through security advisories related to the pitra-31 package.