SQL Injection in order/limit

Affecting sequelize package, versions >=0.2.2 <3.13.17

Do your applications use this vulnerable package? Test your applications

Overview

sequelize versions prior to 3.17.0 are vulnerable to SQL Injection attacks if untrusted user input is passed into the order or limit parameters.

Example

models.User.findAll({
  limit: '1; DELETE FROM "Users" WHERE 1=1; --',
}).then(function (users) {
  console.log(users);
});

Remediation

Upgrade to version 3.17.0 or greater.

References

Snyk patch available for versions:

CVSS Score

7.3
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    Low
  • Integrity
    Low
  • Availability
    Low
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Credit
Spencer Creasey
CWE
CWE-89
Snyk ID
npm:sequelize:20160106
Disclosed
06 Jan, 2015
Published
01 Apr, 2016