Malicious Code Injection in badrchocolat Package
Summary
MAL-2025-170946: Malicious code in badrchocolat (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 badrchocolat package is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores for token rewards. However, it has been compromised to include malicious scripts that manipulate package metadata.
Vulnerability Detail
The vulnerability in the badrchocolat package 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, leading to the pollution of the npm registry. This can result in security risks for developers who unknowingly use these compromised packages, as they may inadvertently expose their applications to further vulnerabilities.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall badrchocolat
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 badrchocolat package until a secure version is released. Additionally, you can use the following command to uninstall the package: 'npm uninstall badrchocolat'.
Conclusion
The badrchocolat package has been identified as containing malicious code that can compromise the security of applications using it. It is crucial for developers to update or uninstall this package to mitigate risks. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for badrchocolat →
FAQ
The badrchocolat package is an npm package associated with the tea.xyz token reward campaign, designed to generate and publish derivative packages.
The vulnerability can lead to the modification of your package.json file and the introduction of malicious packages, which can compromise your application's security.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.
If you cannot update the package, consider uninstalling it and looking for alternative packages that provide similar functionality without the associated risks.
Detailed information about this vulnerability can be found in the Open Source Vulnerability database and on the GitHub repository for malicious packages.