Critical Malicious Code Vulnerability in chai-max Package

chai-max Updated 23 Dec 2025

Summary

23/12/2025
CRITICAL
No i
Critical
Not published

MAL-2025-192754: Malicious code in chai-max (npm). Affected versions are not published. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback