Malicious Code Vulnerability in chai-as-validated Package

chai-as-validated Updated 23 Dec 2025

Summary

23/12/2025
CRITICAL
No i
Critical
Not published

MAL-2025-192724: Malicious code in chai-as-validated (npm). Affects chai-as-validated versions 2.3.2. 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-as-validated package is an npm library that provides validation capabilities for Chai assertions. It allows developers to ensure that their test inputs meet specific criteria, enhancing the reliability of unit tests. However, this package has been identified to contain malicious code that could compromise the integrity of applications using it.

Vulnerability Detail

The vulnerability stems from malicious code embedded in version 2.3.2 of the chai-as-validated package. This code can potentially execute harmful operations within the user's environment, leading to data breaches or unauthorized access to sensitive information. The origin of this issue is linked to the package being compromised by malicious actors, which poses significant risks to developers and their applications.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall chai-as-validated

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

If immediate updating is not feasible, consider removing the chai-as-validated package from your project until a secure version is released. You can do this by running 'npm uninstall chai-as-validated'. Alternatively, you may explore other validation libraries that do not have known vulnerabilities.

Conclusion

The chai-as-validated package has been compromised with malicious code, posing significant risks to applications that utilize it. It is essential for developers to update to a secure version or remove the package until a fix is available. Utilizing tools like Vulert can help in monitoring and identifying vulnerabilities in your projects.

See every vulnerability recorded for chai-as-validated →

Share this vulnerability

FAQ

The chai-as-validated package is used for validating inputs in Chai assertions, ensuring that test cases are robust and reliable.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your package-lock.json file.

If you cannot update the package right away, consider removing it from your project or using an alternative validation library until a secure version is available.

More information can be found in the vulnerability report on the Open Source Vulnerability database or by visiting the GitHub repository of the affected package.

The vulnerability was discovered by ReversingLabs, a security research firm specializing in identifying malicious code in software packages.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall chai-as-validated

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