GHSA-fw4p-36j9-rrj3 Denial of Service in sequelize
Attackers can crash the Node.js process by submitting specific input to the SQLite dialect in Sequelize, causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-fw4p-36j9-rrj3?
GHSA-fw4p-36j9-rrj3 is a denial of service vulnerability in sequelize, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by GHSA-fw4p-36j9-rrj3?
2 open source packages ship an affected version, including sequelize.
| Package | Affected | Fixed in |
|---|---|---|
sequelize npm | All versions | 4.44.4 |
sequelize npm | All versions | 4.44.4 |
How do I fix GHSA-fw4p-36j9-rrj3?
Upgrade sequelize to 4.44.4 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is GHSA-fw4p-36j9-rrj3 being exploited?
There is no known exploitation of GHSA-fw4p-36j9-rrj3 in the wild and no public exploit code.