Critical Malicious Code Vulnerability in chai-uuids Package
Summary
MAL-2025-192383: Malicious code in chai-uuids (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 chai-uuids package is a utility library for generating UUIDs (Universally Unique Identifiers) in Node.js applications. It is commonly used in various projects for creating unique identifiers for objects, sessions, or database entries. However, this package has been compromised, leading to significant security concerns for any application that relies on it.
Vulnerability Detail
The vulnerability stems from the presence of malicious code within the chai-uuids package. This code can fully compromise any computer where the package is installed, allowing unauthorized access to sensitive information, including secrets and keys. The malicious nature of the code is classified under CWE-506, indicating that it contains embedded malicious code. Users are advised to treat any system running this package as potentially compromised.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chai-uuids
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 workaround, you can temporarily replace the functionality provided by chai-uuids with another UUID generation library, such as uuid. You can install it using npm: npm install uuid. Then, update your code to use this library for generating UUIDs instead of chai-uuids.
Conclusion
The discovery of malicious code within the chai-uuids package poses a severe risk to any system that has it installed. Immediate action is required to mitigate the threat, including removing the package and securing sensitive information. Users should remain vigilant and consider alternative libraries for UUID generation.
See every vulnerability recorded for chai-uuids →
FAQ
Immediately remove the chai-uuids package from your project and rotate any sensitive information stored on the affected system.
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.
As of now, there is no patched version available. It is crucial to remove the package entirely.
Failing to address this vulnerability can lead to unauthorized access to sensitive data, complete system compromise, and potential data breaches.
No, it is highly recommended to remove the package regardless of whether you notice immediate issues, as the malicious code can operate without obvious symptoms.