CVE-2023-22579: Unsafe fall-through in getWhereConditions in Sequelize

sequelize Updated 02 Oct 2025

Summary

23/02/2023
Yes i
Critical
9.9

CVE-2023-22579: Unsafe fall-through in getWhereConditions. Affects sequelize versions < 6.28.1. Fixed in 6.28.1. 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

Sequelize is an open-source Object-Relational Mapping (ORM) library for Node.js that provides easy access to databases. It allows developers to interact with databases using JavaScript objects instead of writing raw SQL queries. Sequelize is widely used in web applications to handle database operations efficiently and securely. However, a vulnerability has been discovered in the library that could lead to potential security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2023-22579, exists in the getWhereConditions function of Sequelize. When an invalid value is provided to the where option of a query, Sequelize ignores the option instead of throwing an error. This behavior can result in unintended consequences and may allow attackers to bypass security measures or perform unauthorized actions. For example, a finder call like User.findAll({ where: new Date() }) would not throw an error, potentially leading to unexpected data retrieval or modification.

How To Fix

Latest published version: 6.37.8 as of 23 Oct 2026

npm install sequelize@6.37.8

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.28.1

This is the first release that contains the fix.

npm install sequelize@6.28.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, developers can manually validate the where option before passing it to Sequelize. This can be done by checking the type of the value and ensuring it is a valid JavaScript object. Here's an example of how to implement this workaround:

const whereOption = new Date();

if (typeof whereOption === 'object' && !Array.isArray(whereOption)) {
  User.findAll({ where: whereOption });
} else {
  // Handle invalid where option
}

Conclusion

In conclusion, the vulnerability in Sequelize's getWhereConditions function could allow attackers to bypass security measures and perform unauthorized actions on the database. It is crucial to update the Sequelize library to version 6.28.1 or later and review any code that uses the where option. By following these steps, developers can mitigate the risk associated with this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for sequelize →

Share this vulnerability

FAQ

Sequelize is an open-source Object-Relational Mapping (ORM) library for Node.js that simplifies database operations by allowing developers to interact with databases using JavaScript objects.

The vulnerability allows attackers to provide invalid values to the where option of a query, bypassing security measures and potentially performing unauthorized actions on the database.

To fix this vulnerability, update the Sequelize library to version 6.28.1 or later by running npm install sequelize@6.28.1 in your Node.js project. Additionally, review and update any code that uses the where option to ensure only valid values are provided.

Yes, a temporary workaround is to manually validate the where option before passing it to Sequelize. Check the type of the value and ensure it is a valid JavaScript object.

Related vulnerabilities

Recent vulnerabilities recorded for sequelize.

How To Fix

Latest published version: 6.37.8 as of 23 Oct 2026

npm install sequelize@6.37.8

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.28.1

This is the first release that contains the fix.

npm install sequelize@6.28.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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