Malicious Code Vulnerability in badiouchocolat: npm Package Exploit
Summary
MAL-2025-170945: Malicious code in badiouchocolat (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
badiouchocolat is an npm package that is part of a larger ecosystem of packages associated with the tea.xyz token reward campaign. This package, like others in the campaign, is designed to manipulate npm's registry by generating and publishing derivative packages with randomized names. The primary functionality of badiouchocolat is to serve as a reward mechanism for developers, but it has been compromised to serve malicious purposes.
Vulnerability Detail
The vulnerability in badiouchocolat originates from its association with a malicious campaign that floods the npm registry with derivative packages. The malicious code modifies the package.json file to remove private flags, alters version numbers, and generates random package names, which can lead to reputation inflation for developers. This behavior not only pollutes the npm registry but also poses risks of unintentional dependency inclusion in projects, potentially leading to further exploitation.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall badiouchocolat
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 remove the badiouchocolat package from your project by executing: npm uninstall badiouchocolat. This will prevent any potential exploitation from the malicious code until a fix is applied.
Conclusion
The badiouchocolat package has been identified as containing malicious code that can compromise npm projects. It is crucial for developers to be aware of this vulnerability, take immediate action to remove the package, and monitor their projects for any potential risks. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for badiouchocolat →
FAQ
badiouchocolat is an npm package involved in a token reward campaign that has been compromised to include malicious code.
The malicious code can alter your package.json, inflate developer reputation scores, and pollute the npm registry with unwanted packages.
You should uninstall the package immediately and monitor for any updates or patches that may be released.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json file.
Yes, you can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without any signup.