Malicious Code Injection in donut-notthedevs Package - npm Vulnerability
Summary
MAL-2025-101735: Malicious code in donut-notthedevs (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 donut-notthedevs package is part of the npm ecosystem, which is widely used for JavaScript package management. This package, like many others, is intended to facilitate the development and sharing of code. However, it has been identified as part of a malicious campaign that exploits npm's publishing mechanisms, leading to potential security risks for developers and their applications.
Vulnerability Detail
The vulnerability in the donut-notthedevs package originates from its association with the tea.xyz token reward campaign. This campaign has flooded the npm registry with malicious packages that contain scripts designed to automatically publish derivative packages with randomized names. The malicious payload modifies the package.json file to remove private flags, alters version numbers, and generates random package names, ultimately polluting the npm registry and potentially compromising the integrity of projects that depend on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall donut-notthedevs
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 donut-notthedevs package and replace it with a trusted alternative. Additionally, consider using tools like Vulert to monitor your package-lock.json file for vulnerabilities. You can check your application for vulnerabilities using the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The donut-notthedevs package poses a significant security risk due to its malicious code that alters package configurations and floods the npm registry. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities to ensure the security of their applications.
See every vulnerability recorded for donut-notthedevs →
FAQ
The donut-notthedevs package is an npm package that has been identified as part of a malicious campaign targeting the npm registry.
This vulnerability can compromise the integrity of your application by introducing malicious code that modifies your package.json and republishing harmful variants.
If you have installed the donut-notthedevs package, you should uninstall it immediately using 'npm uninstall donut-notthedevs' and check your project for any other affected packages.
You can use tools like Vulert, which monitors your package-lock.json file for vulnerabilities in real-time. You can also check your application using the Vulert playground.
There are no patches available for the donut-notthedevs package itself, as it is recommended to remove the package entirely from your project.