Malicious Code Injection in friendly_haddock_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-102928: Malicious code in friendly_haddock_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 'friendly_haddock_z3n' is part of the npm ecosystem, which is widely used for JavaScript package management. It is designed to facilitate the development and sharing of reusable code. However, this package has been identified as part of a malicious campaign that aims to exploit the npm registry by flooding it with derivative packages, thereby inflating developer reputation scores for token rewards.
Vulnerability Detail
The vulnerability in 'friendly_haddock_z3n' originates from its association with the tea.xyz token reward campaign. This package contains malicious scripts that modify the package.json file to remove private flags, alter version numbers, and generate random package names. The scripts continuously republish these variants, leading to pollution of the npm registry and potential security risks for developers who unknowingly use these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall friendly_haddock_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 'friendly_haddock_z3n' package and look for alternative packages that provide similar functionality without the associated risks. Additionally, consider implementing strict package management practices to monitor and vet the packages you include in your projects.
Conclusion
The 'friendly_haddock_z3n' package poses a significant threat to the npm ecosystem due to its malicious code designed to exploit the registry. It is essential for developers to be vigilant, remove any affected packages, and adopt best practices for package management to safeguard their applications.
See every vulnerability recorded for friendly_haddock_z3n →
FAQ
The malicious code can lead to the pollution of the npm registry, making it difficult for developers to find trustworthy packages and potentially compromising the security of their applications.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By utilizing the Vulert playground, you can check if your application is affected by this vulnerability without any signup.
If you have installed 'friendly_haddock_z3n', it is crucial to uninstall it immediately and review your project's dependencies for any other potentially malicious packages.
While specific alternatives may vary based on your project's needs, consider searching the npm registry for reputable packages that offer similar functionalities without the associated risks.
To prevent similar vulnerabilities, regularly audit your dependencies, use tools like Vulert for monitoring, and stay informed about security advisories related to the packages you use.