Advisory

GHSA-vqfx-gj96-3w95

Also known as: CVE-2023-22579

Summary

Unsafe fall-through in getWhereConditions

Details

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 `[email protected]` & `@sequelize/[email protected]`

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

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2023-02-23 16:58 UTC
Modified
2023-11-08 04:11 UTC

Affected packages and fixes

sequelize

npm · All systems

Affected

  • introduced 0, fixed 6.28.1 (semver)

Fixed versions

6.28.1

Fix

@sequelize/core

npm · All systems

Affected

  • introduced 0, fixed 7.0.0-alpha.20 (semver)

Fixed versions

7.0.0-alpha.20

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences