Malicious Code Injection in defiant_snail_z3n Package - npm Vulnerability
Summary
MAL-2025-101280: Malicious code in defiant_snail_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 defiant_snail_z3n package is part of the npm ecosystem, often associated with token reward campaigns. It is designed to facilitate the distribution of software packages. However, it has been identified as a malicious package that can compromise the integrity of the npm registry by generating and publishing numerous derivative packages with altered metadata.
Vulnerability Detail
The vulnerability in the defiant_snail_z3n package stems from its malicious code, which modifies the package.json file to remove private flags and alters version numbers. This code generates random package names, primarily themed around Indonesian culture, and continuously republishes these variants to inflate developer reputation scores for token rewards. This behavior not only pollutes the npm registry but also poses risks of dependency confusion and potential exploitation in applications relying on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall defiant_snail_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 defiant_snail_z3n package and replace it with a trusted alternative. Additionally, regularly audit your npm packages using tools like npm audit to identify and mitigate vulnerabilities.
Conclusion
The defiant_snail_z3n package poses significant risks due to its malicious behavior, which can compromise the integrity of your application and the npm registry. It is crucial to remove this package and monitor your dependencies for vulnerabilities to maintain a secure development environment.
See every vulnerability recorded for defiant_snail_z3n →
FAQ
The defiant_snail_z3n package is an npm package that has been identified as malicious, designed to manipulate the npm registry by publishing numerous derivative packages.
This vulnerability can lead to dependency confusion, where malicious packages may be inadvertently used in your application, potentially compromising security and functionality.
If you have installed the defiant_snail_z3n package, you should uninstall it immediately and check for any other dependencies that may be affected.
You can use tools like Vulert, which monitors your package-lock.json file to alert you in real-time for open-source vulnerabilities. You can also check your application using the Vulert playground without any signup.
Yes, consider using well-established and trusted packages that provide similar functionality without the associated risks.