Malicious Code Injection in complex_moth_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-93680: Malicious code in complex_moth_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 'complex_moth_z3n' is part of a series of npm packages associated with the tea.xyz token reward campaign. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. The malicious nature of this package lies in its ability to modify critical files and republish variants, thus polluting the npm registry.
Vulnerability Detail
The vulnerability in 'complex_moth_z3n' originates from its inclusion in a malicious campaign that employs autopublish scripts to manipulate package.json files. This manipulation removes private flags, alters version numbers, and generates random package names, leading to a significant risk of registry pollution and potential exploitation of developers' reputations. The technical aspects include the modification of package metadata and the continuous republishing of variants, which can compromise the integrity of the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall complex_moth_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 remove the 'complex_moth_z3n' package from your project by executing the command: 'npm uninstall complex_moth_z3n'. This will prevent any malicious activity associated with the package until a fix is applied.
Conclusion
The 'complex_moth_z3n' package poses a significant threat due to its malicious code designed to manipulate package metadata and republish variants. It is crucial for developers to take immediate action by updating or removing the package to safeguard their projects and maintain the integrity of the npm ecosystem.
See every vulnerability recorded for complex_moth_z3n →
FAQ
The primary risk is the modification of package.json files, which can lead to unauthorized republishing of malicious variants, compromising the integrity of the npm registry.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If you have installed complex_moth_z3n, you should uninstall it immediately and check for any updates or patches that may address the vulnerability.
Yes, tools like Vulert can monitor your package-lock.json file to alert you in real-time for open-source vulnerabilities in your software.
If immediate updates are not possible, consider removing the package as a temporary measure to mitigate risks until a fix is available.