Malicious Code Injection in precious_swan_z3n Package
Summary
MAL-2025-95969: Malicious code in precious_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
The precious_swan_z3n package is part of the npm ecosystem, which is widely used for JavaScript package management. This package is associated with the tea.xyz token reward campaign, which has been known to flood the npm registry with malicious packages. The primary functionality of this package is to facilitate token rewards, but it has been compromised to include harmful scripts that manipulate package metadata.
Vulnerability Detail
The vulnerability in the precious_swan_z3n package originates from its association with a malicious campaign that aims to inflate developer reputation scores through the automatic generation and publication of 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 pollution of the npm registry. This can result in security risks for developers who unknowingly use these compromised packages, as they may inadvertently integrate malicious code into their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall precious_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 workaround, avoid using the precious_swan_z3n package and consider using alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your dependencies using tools like Vulert, which can alert you to vulnerabilities in your package-lock.json file.
Conclusion
The precious_swan_z3n package poses a significant security risk due to its malicious code injection. It is crucial for developers to remove this package from their projects and monitor their dependencies for vulnerabilities. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for precious_swan_z3n →
FAQ
The precious_swan_z3n package is an npm package associated with the tea.xyz token reward campaign, which has been compromised to include malicious code.
The vulnerability can lead to the inclusion of malicious code in your application, potentially compromising its security and integrity.
You should uninstall the precious_swan_z3n package immediately and check for any other affected packages in your project.
You can use tools like Vulert to monitor your package-lock.json file for open-source vulnerabilities in real-time.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.