Malicious Code Injection in stiff_damselfly_z3n: A Threat to npm Packages
Summary
MAL-2025-98947: Malicious code in stiff_damselfly_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 'stiff_damselfly_z3n' 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. These packages often contain scripts designed to manipulate the npm registry and inflate developer reputation scores. The vulnerability in question allows for unauthorized modifications to the package metadata, leading to potential abuse of the npm ecosystem.
Vulnerability Detail
The vulnerability originates from the malicious design of the 'stiff_damselfly_z3n' package, which includes scripts that automatically modify the package.json file. This includes removing private flags, altering version numbers, and generating random package names. The ramifications of this vulnerability are significant, as it can lead to the pollution of the npm registry with numerous derivative packages, compromising the integrity of the ecosystem and potentially affecting other developers who rely on npm for their projects.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall stiff_damselfly_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 prevent the installation of the affected package by using npm's package-lock.json file to lock your dependencies. Additionally, consider using tools like Vulert to monitor your project for vulnerabilities. You can check if your application is affected by this vulnerability using the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The 'stiff_damselfly_z3n' package poses a significant risk to the npm ecosystem due to its malicious code that modifies package metadata. It is essential for developers to be vigilant and take immediate action to remove affected packages and monitor their projects for vulnerabilities. Utilizing tools like Vulert can aid in maintaining the security of your applications.
See every vulnerability recorded for stiff_damselfly_z3n →
FAQ
It is an npm package that has been identified as malicious, designed to manipulate the npm registry.
The vulnerability can lead to unauthorized modifications in your project's dependencies, potentially compromising security and integrity.
You should uninstall the package immediately and monitor your project for any further vulnerabilities.
Yes, regularly monitor your dependencies using tools like Vulert and keep your packages updated to their latest versions.
You can find detailed information in the vulnerability report and by checking the package's repository on npm.