tramdhan / express_api

Boilerplate express backend
MIT License
2 stars 0 forks source link

🚨 [security] Update sequelize: 6.25.7 → 6.29.3 (minor) #31

Closed depfu[bot] closed 1 year ago

depfu[bot] commented 1 year ago

🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ sequelize (6.25.7 → 6.29.3) · Repo

Security Advisories 🚨

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

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 #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 #15694
CVE: CVE-2023-22578

🚨 Unsafe fall-through in getWhereConditions

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

CVE: CVE-2023-22579
Snyk: https://security.snyk.io/vuln/SNYK-JS-SEQUELIZE-3324090

🚨 Sequelize information disclosure vulnerability

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

Release Notes

6.29.3

6.29.3 (2023-03-10)

Bug Fixes

6.29.2

6.29.2 (2023-03-09)

Bug Fixes

6.29.1

6.29.1 (2023-03-07)

Bug Fixes

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

6.29.0

6.29.0 (2023-02-23)

Features

6.28.2

6.28.2 (2023-02-22)

Bug Fixes

6.28.1

6.28.1 (2023-02-21)

Bug Fixes

6.28.0

6.28.0 (2022-12-20)

Features

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

6.27.0

6.27.0 (2022-12-12)

Features

6.26.0

6.26.0 (2022-11-29)

Features

6.25.8

6.25.8 (2022-11-22)

Bug Fixes

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 12 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
depfu[bot] commented 1 year ago

Closed in favor of #33.