Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

GHSA-f598-mfpv-gmfx

CRITICALFix: sequelize/sequelize#15710

GHSA-f598-mfpv-gmfx is a critical-severity (CVSS 10) CWE-790 vulnerability in @sequelize/core. O3 Security confirms whether GHSA-f598-mfpv-gmfx is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Sequelize - Default support for “raw attributes” when using parentheses

Also known asCVE-2023-22578
Published
Feb 24, 2023
Updated
Nov 8, 2023
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Nov 8, 2023 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

@sequelize/corenpm
40Kdownloads / week
sequelizenpm
2.9Mdownloads / week

Description

Impact

Sequelize 6.28.2 and prior has a dangerous feature where using parentheses in the attribute option would make Sequelize use the string as-is in the SQL

User.findAll({
  attributes: [
    ['count(id)', 'count']
  ]
});

Produced

SELECT count(id) AS "count" FROM "users"

Patches

This feature was deprecated in Sequelize 5, and using it prints a deprecation warning.

This issue has been patched in @sequelize/[email protected] and [email protected].

In Sequelize 7, it now produces the following:

SELECT "count(id)" AS "count" FROM "users"

In Sequelize 6, it throws an error explaining that we had to introduce a breaking change, and requires the user to explicitly opt-in to either the Sequelize 7 behavior (always escape) or the Sequelize 5 behavior (inline attributes that include () without escaping). See https://github.com/sequelize/sequelize/pull/15710 for more information.

Mitigations

Do not use user-provided content to build your list or attributes. If you do, make sure that attribute in question actually exists on your model by checking that it exists in the rawAttributes property of your model first.


A discussion thread about this issue is open at https://github.com/sequelize/sequelize/discussions/15694 CVE: CVE-2023-22578

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npm@sequelize/coreall versions7.0.0-alpha.20
📦npmsequelizeall versions6.29.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @sequelize/core. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @sequelize/core to 7.0.0-alpha.20 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-f598-mfpv-gmfx is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-f598-mfpv-gmfx is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-f598-mfpv-gmfx. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact Sequelize 6.28.2 and prior has a dangerous feature where using parentheses in the attribute option would make Sequelize use the string as-is in the SQL ```ts User.findAll({ attributes: [ ['count(id)', 'count'] ] }); ``` Produced ```sql SELECT count(id) AS "count" FROM "users" ``` ### Patches This feature was deprecated in Sequelize 5, and using it prints a deprecation warning. This issue has been patched in [`@sequelize/[email protected]`](https://github.com/sequelize/sequelize/pull/15374) and [`[email protected]`](https://github.com/sequelize/sequelize/pull/15710).
O3 Security · Impact-Aware SCA

Is GHSA-f598-mfpv-gmfx in your dependencies?

O3 detects GHSA-f598-mfpv-gmfx across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-f598-mfpv-gmfx: @sequelize/core… | O3 Security