GitHub Advisoryadvisory · npm

GHSA-m9jw-237r-gvfv SQL Injection in sequelize

CRITICAL Published 2019-10-25 Modified 2023-09-11 Official page ↗
Aliases
CVE-2019-10752
Ecosystem
npm
Packages
sequelize
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-89
Reviewed
2019-10-22

Affected packages

• npm sequelize: < 4.44.3 → fixed in 4.44.3 • npm sequelize: >= 5.0.0, < 5.15.1 → fixed in 5.15.1

Description

Affected versions of `sequelize` are vulnerable to SQL Injection. The function `sequelize.json()` incorrectly formatted sub paths for JSON queries, which allows attackers to inject SQL statements and execute arbitrary SQL queries if user input is passed to the query. Exploitation example: ```js return User.findAll({ where: this.sequelize.json("data.id')) AS DECIMAL) = 1 DELETE YOLO INJECTIONS; -- ", 1) }); ``` Recommendation If you are using `sequelize` 5.x, upgrade to version 5.15.1 or later. If you are using `sequelize` 4.x, upgrade to version 4.44.3 or later.

Related

Alias · CVE (1)

  • CVE-2019-10752 Sequelize, all versions prior to version 4.44.3 and 5.15.1, is vulnerable to SQL Injection due to sequelize.json() helper function not… vulnerability

Weakness · CWE (1)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness

References