Malicious Code Injection in pitra-2 Package: A Threat to npm Users
Summary
MAL-2025-164288: Malicious code in pitra-2 (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-2 package is part of the npm ecosystem, primarily used for various JavaScript applications. It is often involved in token reward campaigns, which can lead to the proliferation of malicious packages. This specific package has been identified as containing harmful scripts that manipulate package metadata, potentially affecting developers and users by inflating reputation scores through deceptive practices.
Vulnerability Detail
The vulnerability in the pitra-2 package originates from its association with the tea.xyz token reward campaign. It includes malicious scripts that modify the package.json file by removing private flags, altering version numbers, and generating random package names. This behavior leads to the continuous republishing of variants, which pollutes the npm registry and can compromise the integrity of the ecosystem. Users may unknowingly install these malicious packages, leading to security risks and potential data breaches.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall pitra-2
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 the pitra-2 package and monitor your project for any dependencies that may rely on it. Regularly audit your package-lock.json file to identify and remove any malicious packages.
Conclusion
The pitra-2 package poses a significant risk due to its malicious code that alters package metadata and floods the npm registry. It is essential for developers to remove this package and monitor their dependencies to maintain the security of their applications. Utilizing tools like Vulert can help in identifying and mitigating such vulnerabilities effectively.
See every vulnerability recorded for pitra-2 →
FAQ
The pitra-2 package is an npm package that has been linked to malicious activities, particularly in the context of token reward campaigns.
The vulnerability can lead to the installation of malicious code that modifies your project's package metadata, potentially compromising security and integrity.
You should uninstall the pitra-2 package immediately and check for any other dependencies that may be affected.
You can use tools like Vulert, which monitors your package-lock.json file for open-source vulnerabilities in real-time without requiring code access or installation.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.