Skip to content

Update dependency sequelize to v6 [SECURITY] - #920

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-sequelize-vulnerability
Open

Update dependency sequelize to v6 [SECURITY]#920
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-sequelize-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
sequelize (source) ^5.15.1^6.0.0 age confidence

Sequelize information disclosure vulnerability

CVE-2023-22580 / GHSA-8c25-f3mj-v6h8

More information

Details

Due to improper input filtering in the sequelize js library, can malicious queries lead to sensitive information disclosure.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Sequelize vulnerable to SQL Injection via replacements

CVE-2023-25813 / GHSA-wrh9-cjv3-2hpw

More information

Details

Impact

The SQL injection exploit is related to replacements. Here is such an example:

In the following query, some parameters are passed through replacements, and some are passed directly through the where option.

User.findAll({
  where: or(
    literal('soundex("firstName") = soundex(:firstName)'),
    { lastName: lastName },
  ),
  replacements: { firstName },
})

This is a very legitimate use case, but this query was vulnerable to SQL injection due to how Sequelize processed the query: Sequelize built a first query using the where option, then passed it over to sequelize.query which parsed the resulting SQL to inject all :replacements.

If the user passed values such as

{
  "firstName": "OR true; DROP TABLE users;",
  "lastName": ":firstName"
}

Sequelize would first generate this query:

SELECT * FROM users WHERE soundex("firstName") = soundex(:firstName) OR "lastName" = ':firstName'

Then would inject replacements in it, which resulted in this:

SELECT * FROM users WHERE soundex("firstName") = soundex('OR true; DROP TABLE users;') OR "lastName" = ''OR true; DROP TABLE users;''

As you can see this resulted in arbitrary user-provided SQL being executed.

Patches

The issue was fixed in Sequelize 6.19.1

Workarounds

Do not use the replacements and the where option in the same query if you are not using Sequelize >= 6.19.1

References

See this thread for more information: https://github.com/sequelize/sequelize/issues/14519

Snyk: https://security.snyk.io/vuln/SNYK-JS-SEQUELIZE-2932027

Severity

  • CVSS Score: 10.0 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Unsafe fall-through in getWhereConditions

CVE-2023-22579 / GHSA-vqfx-gj96-3w95

More information

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 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

Severity

  • CVSS Score: 9.9 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


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

CVE-2023-22578 / GHSA-f598-mfpv-gmfx

More information

Details

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/core@7.0.0.alpha-20 and sequelize@6.29.0.

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

Severity

  • CVSS Score: 10.0 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Sequelize: SQL Injection (Oracle DB)

CVE-2026-69240 / GHSA-v8fg-2rw7-q452

More information

Details

Summary

SQL Injection is possible with strings only if dialect is set to oracle.
The vulnerability was confirmed on Sequelize v6.37.3.

Details

The escape function defined in sql-string.js does not escape quotes if the value starts with TO_TIMESTAMP or TO_DATE.

  } else if (dialect === 'oracle' && typeof val === 'string') {
    if (val.startsWith('TO_TIMESTAMP') || val.startsWith('TO_DATE')) {
      return val;
    }
    val = val.replace(/'/g, "''");
  }
PoC

Suppose the application has the following code:

  var result = await models.Student.findOne({
    where: {
      firstName: req.query.firstName
    }
  });

An attacker can inject arbitrary sql expressions.

http://host/path?firstName=TO_DATE('0','Y')||'' OR 1=1--

The resulted SQL will be:

SELECT ... WHERE "Student"."firstName" = TO_DATE('0','Y')||'' OR 1=1-- ORDER BY "Student"."id" OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY;
Impact

Data theft and tampering.

Severity

  • CVSS Score: 9.8 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

sequelize/sequelize (sequelize)

v6.37.4

Compare Source

Bug Fixes

v6.37.3

Compare Source

Bug Fixes
  • postgres: use schema for foreign key constrains of a table (#​17099) (6aba382)

v6.37.2

Compare Source

Bug Fixes

v6.37.1

Compare Source

Bug Fixes

v6.37.0

Compare Source

Features

v6.36.0

Compare Source

Features

v6.35.2

Compare Source

Bug Fixes

v6.35.1

Compare Source

Bug Fixes
  • mssql: allow calling describeTable a table with a dot in its name (#​16769) (47cba67)

v6.35.0

Compare Source

Features

v6.34.0

Compare Source

Bug Fixes
Features

v6.33.0

Compare Source

Bug Fixes
Features

v6.32.1

Compare Source

Bug Fixes

v6.32.0

Compare Source

Bug Fixes
Features

v6.31.1

Compare Source

Bug Fixes
  • postgres: adds support for minifying through join aliases (#​15897) (a9fd501)

v6.31.0

Compare Source

Bug Fixes
Features

v6.30.0

Compare Source

Bug Fixes
Features
  • postgres, sqlite: add conflictWhere option to Model.bulkCreate (#​15788) (295c297)
  • postgres, sqlite: add conflictWhere option to upsert (#​15786) (1e68681)
  • postgres, sqlite: allow override of conflict keys for bulkCreate (#​15787) (2e50bd9)

v6.29.3

Compare Source

Bug Fixes

v6.29.2

Compare Source

Bug Fixes

v6.29.1

Compare Source

Bug Fixes
  • postgres: make sync not fail when trying to create existing enum (#​15718) (1b94462)

v6.29.0

Compare Source

Features

v6.28.2

Compare Source

Bug Fixes

v6.28.1

Compare Source

Bug Fixes

v6.28.0

Compare Source

Features
  • types: use retry-as-promised types for retry options to match documentation (#​15484) (fd4afa6)

v6.27.0

Compare Source

Features

v6.26.0

Compare Source

Features

v6.25.8

Compare Source

Bug Fixes

v6.25.7

Compare Source

Bug Fixes

v6.25.6

Compare Source

Bug Fixes

v6.25.5

Compare Source

Bug Fixes

v6.25.4

Compare Source

Bug Fixes

v6.25.3

Compare Source

Bug Fixes
  • don't treat \ as escape in standard strings, support E-strings, support vars after ->> operator, treat lowercase e as valid e-string prefix (#​15139) (7990095), closes #​14700

v6.25.2

Compare Source

Bug Fixes
  • types: fix TS 4.9 excessive depth error on InferAttributes (v6) (#​15135) (851daaf)

v6.25.1

Compare Source

Bug Fixes

v6.25.0

Compare Source

Features

v6.24.0

Compare Source

Features
  • snowflake: Add support for QueryGenerator#tableExistsQuery (#​15087) (a44772e)

v6.23.2

Compare Source

Bug Fixes
  • postgres: add custom order direction to subQuery ordering with minified alias (#​15056) (7203b66)

v6.23.1

Compare Source

Bug Fixes

v6.23.0

Compare Source

Features

v6.22.1

Compare Source

Bug Fixes

v6.22.0

Compare Source

Features

v6.21.6

Compare Source

Bug Fixes

v6.21.5

Compare Source

Bug Fixes

v6.21.4

Compare Source

Bug Fixes

v6.21.3

Compare Source

Bug Fixes
  • postgres: attach postgres error-handler earlier in lifecycle (v6) (#​14731) (90bb694)

v6.21.2

Compare Source

Bug Fixes

v6.21.1

Compare Source

Bug Fixes

v6.21.0

Compare Source

Features
  • exports types to support typescript >= 4.5 nodenext module (#​14620) (cbdf73e)

v6.20.1

Compare Source

Bug Fixes

v6.20.0

Compare Source

Features

v6.19.2

Compare Source

Bug Fixes

v6.19.1

Compare Source

Bug Fixes

⚠️ BREAKING CHANGE: This change is a security fix that patches a serious SQL injection vulnerability, however it is possible that your application made use of it and broke as a result of this change. Please see this issue for more information.

v6.19.0

Compare Source

Bug Fixes
Features
  • types: make Model.init aware of pre-configured foreign keys (#​14370) (5954d2c)

v6.18.0

Compare Source

Features
  • add whereScopeStrategy to merge where scopes with Op.and (#​14152) (8349c02)

v6.17.0

Compare Source

Bug Fixes
Features

v6.16.3

Compare Source

Bug Fixes

v6.16.2

Compare Source

Bug Fixes

v6.16.1

Compare Source

Bug Fixes

v6.16.0

Compare Source

Features

v6.15.1

Compare Source

Bug Fixes

v6.15.0

Compare Source

Bug Fixes
Features

v6.14.1

Compare Source

Bug Fixes

v6.14.0

Compare Source

Bug Fixes
Features

v6.13.0

Compare Source

Bug Fixes
Features

v6.12.5

Compare Source

Bug Fixes

v6.12.4

Compare Source

Bug Fixes
  • mssql/async-queue: fix unable to start mysql due to circular ref (#​13823) (49e8614)

v6.12.3

Compare Source

Bug Fixes

v6.12.2

Compare Source

Bug Fixes

v6.12.1

Compare Source

Bug Fixes

v6.12.0

Compare Source

Bug Fixes

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from ca130c3 to d10f2ab Compare September 25, 2025 16:17
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from d10f2ab to 8be697b Compare October 16, 2025 02:10
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from 8be697b to 5ef7e74 Compare November 10, 2025 14:57
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from 5ef7e74 to 71c4b27 Compare November 18, 2025 12:37
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from 71c4b27 to fb9cfac Compare December 31, 2025 14:36
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from fb9cfac to b239751 Compare January 19, 2026 16:47
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from b239751 to 2deeb52 Compare February 2, 2026 17:39
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from 2deeb52 to b272174 Compare February 12, 2026 17:56
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from b272174 to 74998dd Compare March 5, 2026 14:02
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from 74998dd to c2a0d3a Compare March 13, 2026 16:14
@renovate renovate Bot changed the title Update dependency sequelize to v6 [SECURITY] Update dependency sequelize to v6 [SECURITY] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate
renovate Bot deleted the renovate/npm-sequelize-vulnerability branch March 27, 2026 02:03
@renovate renovate Bot changed the title Update dependency sequelize to v6 [SECURITY] - autoclosed Update dependency sequelize to v6 [SECURITY] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch 2 times, most recently from c2a0d3a to c07f57b Compare March 30, 2026 17:55
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from c07f57b to 0ae771a Compare April 8, 2026 19:08
@renovate renovate Bot changed the title Update dependency sequelize to v6 [SECURITY] Update dependency sequelize to v6 [SECURITY] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title Update dependency sequelize to v6 [SECURITY] - autoclosed Update dependency sequelize to v6 [SECURITY] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch 2 times, most recently from 0ae771a to 3b208e3 Compare April 27, 2026 21:29
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch 2 times, most recently from d0958a6 to b235b6b Compare May 18, 2026 20:57
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from b235b6b to 6943874 Compare May 28, 2026 14:11
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from 6943874 to 1350924 Compare June 11, 2026 12:54
@renovate
renovate Bot force-pushed the renovate/npm-sequelize-vulnerability branch from 1350924 to 412f5e8 Compare July 12, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants