Malicious Code Injection in diverse_weasel_0xrequest Package - npm Vulnerability
Summary
MAL-2025-101679: Malicious code in diverse_weasel_0xrequest (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 diverse_weasel_0xrequest package is part of the npm ecosystem, typically used for various web development tasks. However, it has been identified as part of a malicious campaign that aims to exploit npm's package publishing system. This package, like others in the campaign, is designed to inflate developer reputation scores through the automatic generation and publishing of derivative packages with randomized names.
Vulnerability Detail
The vulnerability stems from the malicious code embedded within the diverse_weasel_0xrequest package. This code modifies the package.json file to remove private flags, alters version numbers, and generates random package names, which are then continuously republished to pollute the npm registry. This not only compromises the integrity of the npm ecosystem but also poses risks to developers who may unknowingly use these compromised packages in their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall diverse_weasel_0xrequest
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 diverse_weasel_0xrequest package and look for alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your package-lock.json file for any unauthorized changes.
Conclusion
The diverse_weasel_0xrequest package poses a significant risk due to its malicious code designed to exploit the npm registry. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities. Utilizing tools like Vulert can provide additional security by alerting you to potential issues in your open-source dependencies.
See every vulnerability recorded for diverse_weasel_0xrequest →
FAQ
It is an npm package that has been identified as part of a malicious campaign aimed at exploiting the npm registry.
Using this package can compromise your application's integrity and expose it to further vulnerabilities due to the malicious code it contains.
You should uninstall the package immediately using the command npm uninstall diverse_weasel_0xrequest.
Yes, tools like Vulert can monitor your package-lock.json file for open-source vulnerabilities in real-time without requiring code access.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.