Malicious Code Injection in spatial_weasel_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-90721: Malicious code in spatial_weasel_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 'spatial_weasel_z3n' is part of the npm ecosystem, which is widely used for JavaScript package management. It is likely associated with the tea.xyz token reward campaign, which has been known to flood npm with malicious packages. These packages often contain scripts that automate the generation and publication of derivative packages, leading to a polluted registry and potential security risks for developers.
Vulnerability Detail
The vulnerability in 'spatial_weasel_z3n' originates from its malicious design, which includes scripts that modify the package.json file to remove private flags and change version numbers. It generates random package names, primarily themed around Indonesian culture, and continuously republishes these variants. This behavior not only inflates developer reputation scores for token rewards but also compromises the integrity of the npm registry, potentially affecting other packages and developers relying on it.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall spatial_weasel_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 'spatial_weasel_z3n' package altogether. If it is already included in your project, remove it as mentioned above. 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 'spatial_weasel_z3n' package poses a significant threat to the npm ecosystem due to its malicious code that manipulates package metadata and inflates developer reputation scores. It is essential for developers to remove this package and monitor their projects for vulnerabilities using tools like Vulert.
See every vulnerability recorded for spatial_weasel_z3n →
FAQ
The main issue is that it contains malicious code designed to manipulate the npm registry and inflate developer reputation scores through automated publishing.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
You should uninstall the package immediately using 'npm uninstall spatial_weasel_z3n' and check your package-lock.json for any remaining references.
Currently, there are no patches available for the spatial_weasel_z3n package. The best course of action is to remove it from your project.
Vulert is a useful tool that can monitor and alert you in real-time for open-source vulnerabilities in your software using just package-lock.json.