Critical Malicious Code Vulnerability in chai-max Package
Summary
MAL-2025-192754: Malicious code in chai-max (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-max package is an npm library designed for enhancing assertions in testing frameworks. It allows developers to write more expressive tests by providing additional assertion methods. However, this package has been identified as containing malicious code, posing significant security risks to any system that has it installed.
Vulnerability Detail
The vulnerability in the chai-max package stems from the presence of embedded malicious code, which can compromise the entire system where the package is installed. This malicious code can lead to unauthorized access, data breaches, and the potential for attackers to gain full control over the affected machine. Users are advised to treat any system with this package as fully compromised, as simply removing the package may not eliminate all traces of the malicious software.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chai-max
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
There are no effective workarounds for this vulnerability other than removing the package entirely. If you need similar functionality, consider using other well-maintained assertion libraries such as 'chai' or 'jest'.
Conclusion
The discovery of malicious code in the chai-max package poses a serious threat to users and their systems. Immediate action is required to remove the package and secure any potentially compromised information. Utilizing tools like Vulert can help prevent future vulnerabilities.
See every vulnerability recorded for chai-max →
FAQ
Immediately uninstall the chai-max package and rotate any sensitive information that may have been compromised.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.
After removing the package, ensure that you rotate all secrets and keys. It is advisable to perform a thorough security audit of your system.
Yes, consider using other assertion libraries like 'chai' or 'jest' that are actively maintained and do not have known vulnerabilities.
Vulert uses your package-lock.json file to monitor and alert you in real-time for any open-source vulnerabilities, ensuring your application remains secure.