Malicious Code Injection in polite_python_z3n Package: A Threat to npm Users
Summary
MAL-2025-122523: Malicious code in polite_python_z3n (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 polite_python_z3n package is part of the npm ecosystem, typically used for various JavaScript functionalities. However, it has been identified as part of a malicious campaign that exploits npm's package management system. This package is associated with the tea.xyz token reward initiative, which aims to inflate developer reputation scores through the automatic generation and publication of derivative packages.
Vulnerability Detail
The vulnerability in the polite_python_z3n package arises from the presence of malicious code that modifies the package.json file. This code removes private flags, alters version numbers, and generates random package names, 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.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall polite_python_z3n
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 polite_python_z3n package and look for alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your project for vulnerabilities using tools like Vulert, which can alert you to open-source vulnerabilities in real-time without requiring code access.
Conclusion
The discovery of malicious code in the polite_python_z3n package highlights the importance of vigilance in managing npm dependencies. By understanding the nature of this vulnerability and taking proactive steps to mitigate risks, developers can protect their projects from potential exploitation.
See every vulnerability recorded for polite_python_z3n →
FAQ
polite_python_z3n is an npm package that has been identified as part of a malicious campaign aimed at inflating developer reputation scores.
The malicious code modifies your package.json file, potentially leading to the installation of compromised packages and pollution of the npm registry.
You should uninstall the polite_python_z3n package immediately using 'npm uninstall polite_python_z3n' and monitor your project for any further vulnerabilities.
Regularly audit your dependencies, use tools like Vulert for real-time monitoring, and stay informed about known vulnerabilities in the npm ecosystem.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.