Malicious Code Injection in electric_pig_z3n: A Threat to npm Packages
Summary
MAL-2025-94207: Malicious code in electric_pig_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 package electric_pig_z3n is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores in exchange for token rewards. Its functionality is compromised by malicious scripts that manipulate package metadata.
Vulnerability Detail
The vulnerability in electric_pig_z3n originates from its association with a malicious campaign that floods the npm registry with derivative packages. The malicious payload alters the package.json file by removing private flags, changing version numbers, and generating random package names, which leads to the pollution of the npm registry. This can result in developers unknowingly using compromised packages, potentially exposing their applications to further security risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall electric_pig_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 electric_pig_z3n package and consider using alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your package-lock.json file for any unexpected changes.
Conclusion
The electric_pig_z3n package poses a significant security risk due to its malicious code that alters package metadata and floods the npm registry. It is crucial for developers to remove this package and monitor their dependencies to maintain the security of their applications.
See every vulnerability recorded for electric_pig_z3n →
FAQ
electric_pig_z3n is an npm package involved in a token reward campaign that generates and publishes derivative packages to inflate developer reputation scores.
The vulnerability can lead to the inclusion of malicious code in your application, potentially compromising its security and functionality.
You should remove the electric_pig_z3n package from your project immediately and monitor for any updates or patches.
Yes, you can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.
Regularly audit your dependencies, keep them updated, and use tools like Vulert to monitor for vulnerabilities in real-time.