GHSA-fw4p-36j9-rrj3: Sequelize Denial of Service Vulnerability
MODERATEGHSA-fw4p-36j9-rrj3 is a MODERATE denial of service vulnerability (CWE-248: Uncaught Exception) affecting Sequelize libraries in the npm ecosystem. The issue involves denial of service in sequelize. Remediation is available by upgrading affected packages to version 4.44.4.
GHSA-fw4p-36j9-rrj3 at a Glance
How to Fix GHSA-fw4p-36j9-rrj3
To remediate this vulnerability, upgrade all affected Sequelize dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install sequelize@4.44.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls sequelize
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-fw4p-36j9-rrj3, inspect your project dependencies using npm:
npm ls sequelize
Analyze the terminal output to locate any version of Sequelize in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.44.4), your application is affected.
Note: The npm ls sequelize command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Sequelize, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-fw4p-36j9-rrj3 Affected Sequelize Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sequelize
|
npm |
< 4.44.4
|
4.44.4
|
References
Frequently Asked Questions
What is GHSA-fw4p-36j9-rrj3?
Which Sequelize versions are affected?
What version fixes GHSA-fw4p-36j9-rrj3?
Is sequelize affected?
What CWE is associated with GHSA-fw4p-36j9-rrj3?
How can I check npm dependencies for GHSA-fw4p-36j9-rrj3?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fw4p-36j9-rrj3",
"modified" : "2020-08-31T18:48:48Z",
"published" : "2020-09-03T20:25:33Z",
"aliases" : [ ],
"summary" : "Denial of Service in sequelize",
"details" : "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. \n\nThe following proof-of-concept crashes the Node process: \n```\nconst Sequelize = require('sequelize');\n\nconst sequelize = new Sequelize({\n\tdialect: 'sqlite',\n\tstorage: 'database.sqlite'\n});\n\nconst TypeError = sequelize.define('TypeError', {\n\tname: Sequelize.STRING,\n});\n\nTypeError.sync({force: true}).then(() => {\n\treturn TypeError.create({name: \"SELECT tbl_name FROM sqlite_master\"});\n});\n```\n\n\n## Recommendation\n\nUpgrade to version 4.44.4 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "sequelize"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.44.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sequelize/sequelize/pull/11877"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1142"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:48:48Z",
"nvd_published_at" : null
}
}