Malicious Code Injection in capitalist_swordtail_z3n Package
Summary
MAL-2025-100261: Malicious code in capitalist_swordtail_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 capitalist_swordtail_z3n package 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, often with randomized names, to inflate developer reputation scores for token rewards. However, it has been identified as containing malicious code that compromises the integrity of the npm registry.
Vulnerability Detail
The vulnerability originates from the package's malicious payload, which modifies the package.json file by removing private flags and altering version numbers. It generates random package names, primarily themed around Indonesian culture, and continuously republishes these variants to pollute the npm registry. This behavior can lead to significant security risks, including the potential for dependency confusion and the spread of malicious software through the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall capitalist_swordtail_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 capitalist_swordtail_z3n package and any of its derivatives. Additionally, consider using npm audit to identify and address vulnerabilities in your project dependencies.
Conclusion
The capitalist_swordtail_z3n package poses a significant security risk due to its malicious code that alters package metadata and floods the npm registry with harmful variants. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities.
See every vulnerability recorded for capitalist_swordtail_z3n →
FAQ
It is an npm package associated with a token reward campaign that has been identified to contain malicious code.
The vulnerability can lead to the introduction of malicious code into your project, potentially compromising security and stability.
You should remove the capitalist_swordtail_z3n package from your project immediately and check for any other affected dependencies.
You can use tools like Vulert, which monitors your package-lock.json for 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, without needing to sign up.