Malicious Code Injection in anonymous_toucan_z3n: A Threat to npm Packages
Summary
MAL-2025-93241: Malicious code in anonymous_toucan_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 'anonymous_toucan_z3n' is part of a series of npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. The malicious nature of this package lies in its ability to modify critical files and republish variants, leading to potential abuse of the npm registry.
Vulnerability Detail
The vulnerability in 'anonymous_toucan_z3n' originates from its inclusion in a malicious campaign aimed at manipulating the npm ecosystem. The package contains scripts that alter the package.json file by removing private flags, changing version numbers, and generating random package names. This behavior can lead to the pollution of the npm registry, making it difficult for developers to find legitimate packages and potentially exposing them to further security risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall anonymous_toucan_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
Currently, the best workaround is to avoid using the 'anonymous_toucan_z3n' package altogether. If it is already installed, remove it from your project as mentioned above. Additionally, consider using tools like Vulert to monitor your dependencies for vulnerabilities.
Conclusion
The 'anonymous_toucan_z3n' package poses a significant risk due to its malicious code that alters package files and repopulates the npm registry with harmful variants. It is crucial for developers to remove this package and utilize tools like Vulert for ongoing monitoring of their dependencies.
See every vulnerability recorded for anonymous_toucan_z3n →
FAQ
The main issue is that it contains malicious code that modifies package.json files and republishes variants, which can lead to npm registry pollution.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If you have installed 'anonymous_toucan_z3n', you should uninstall it immediately using 'npm uninstall anonymous_toucan_z3n'.
As of now, there are no patches available for 'anonymous_toucan_z3n'. The recommended action is to remove the package.
Vulert monitors your open-source dependencies in real-time for vulnerabilities using just the package-lock.json file, providing alerts for any issues.