Malicious Code Injection in Complicated Swan Z3N: A Threat to NPM Packages
Summary
MAL-2025-93690: Malicious code in complicated_swan_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
Complicated Swan Z3N is an NPM package that is part of the tea.xyz token reward campaign. This package is designed to facilitate the distribution of token rewards through various functionalities. However, it has been identified as a malicious package that employs scripts to manipulate its own metadata and create numerous derivative packages, thereby compromising the integrity of the NPM registry.
Vulnerability Detail
The vulnerability stems from the presence of malicious code within the complicated_swan_z3n package. This code is designed to modify the package.json file by removing private flags and altering version numbers. It generates random package names, often themed around Indonesian culture, and continuously republishes these variants to inflate developer reputation scores. This behavior not only pollutes the NPM registry but also poses risks to developers who may unknowingly use these compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall complicated_swan_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 measure, avoid using the complicated_swan_z3n package and consider using alternative packages that provide similar functionalities without the associated risks. Additionally, you can monitor your package dependencies using tools like Vulert, which can alert you to vulnerabilities in real-time.
Conclusion
The complicated_swan_z3n package poses a significant threat due to its malicious code that alters package metadata and floods the NPM registry. Developers are advised to remove this package from their projects and utilize tools like Vulert to monitor for vulnerabilities. Staying informed and proactive is essential in maintaining the security of your software.
See every vulnerability recorded for complicated_swan_z3n →
FAQ
The primary risk is that it modifies package metadata and floods the NPM registry with malicious variants, which can mislead developers and compromise their projects.
You can use Vulert to monitor your package-lock.json file for vulnerabilities. Visit the Vulert playground at Vulert Scanner to check your application without needing to sign up.
Immediately uninstall the package using 'npm uninstall complicated_swan_z3n' and check for any alternative packages that can fulfill your requirements.
Currently, there are no patches for the complicated_swan_z3n package. The best course of action is to remove it from your project.
Vulert monitors your package-lock.json file for vulnerabilities in real-time and alerts you to any issues, helping you maintain the security of your software.