GHSA-vqfx-gj96-3w95 CVE-2023-22579
Unsafe fall-through in getWhereConditions
- Severity
- 9.9 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.81%
- Chance of exploitation in the next 30 days. Higher than 56.89% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-843 Access of Resource Using Incompatible Type ('Type Confusion')
- Fix
- Available
- 2 packages have a fixed version
Description
Impact
Providing an invalid value to the where option of a query caused Sequelize to ignore that option instead of throwing an error.
A finder call like the following did not throw an error:
User.findAll({
where: new Date(),
});
As this option is typically used with plain javascript objects, be aware that this only happens at the top level of this option.
Patches
This issue has been patched in sequelize@6.28.1 & @sequelize/core@7.0.0.alpha-20
References
A discussion thread about this issue is open at https://github.com/sequelize/sequelize/discussions/15698
CVE: CVE-2023-22579 Snyk: https://security.snyk.io/vuln/SNYK-JS-SEQUELIZE-3324090
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| @sequelize/core | < 7.0.0-alpha.20 |
7.0.0-alpha.20 |
| sequelize | < 6.28.1 |
6.28.1 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
@sequelize/core npm → 7.0.0-alpha.20
- npm
npm install @sequelize/core@7.0.0-alpha.20- yarn
yarn add @sequelize/core@7.0.0-alpha.20- pnpm
pnpm add @sequelize/core@7.0.0-alpha.20
sequelize npm → 6.28.1
- npm
npm install sequelize@6.28.1- yarn
yarn add sequelize@6.28.1- pnpm
pnpm add sequelize@6.28.1
Severity breakdown
CVSS 3.1 9.9
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.
References
Advisories
Packages
Other links
- github.com/sequelize/sequelize/security/advisories/GHSA-vqfx-gj96-3w95
- github.com/sequelize/sequelize/pull/15375
- github.com/sequelize/sequelize/pull/15699
- csirt.divd.nl/CVE-2023-22579
- csirt.divd.nl/DIVD-2022-00020
- github.com/sequelize/sequelize/discussions/15698
- github.com/sequelize/sequelize/releases/tag/v6.28.1
- github.com/sequelize/sequelize/releases/tag/v7.0.0-alpha.20
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-v8fg-2rw7-q452 Sequelize: SQL Injection (Oracle DB) | Critical | Also affects sequelize |
| GHSA-6457-6jrx-69cr Sequelize v6 Vulnerable to SQL Injection via JSON Column Cast Type | High | Also affects sequelize |
| GHSA-wrh9-cjv3-2hpw Sequelize vulnerable to SQL Injection via replacements | Critical | Also affects sequelize |
| GHSA-8c25-f3mj-v6h8 Sequelize information disclosure vulnerability | High | Also affects sequelize |
| GHSA-f598-mfpv-gmfx Sequelize - Default support for “raw attributes” when using parentheses | Critical | Also affects sequelize |
| GHSA-fw4p-36j9-rrj3 Denial of Service in sequelize | Medium | Also affects sequelize |
| GHSA-5v9h-q3gj-c32x SQL Injection via GeoJSON in sequelize | Critical | Also affects sequelize |
| GHSA-2598-2f59-rmhq SQL Injection in sequelize | Critical | Also affects sequelize |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor