CVE-2019-10748: Sequelize SQL injection in JSON path keys

CVE-2019-10748 · Severity: low · CVSS 3.1 · Published 2019-11-06

Sequelize is an Object-Relational Mapper (ORM) library used by Node.js applications to interact with databases. Vulnerable versions fail to properly sanitize JSON path keys when generating SQL queries for MariaDB and MySQL, allowing attackers to inject malicious SQL and execute arbitrary database commands. This could lead to data theft, modification, or deletion from the database.

Technologies: sequelize (npm). Vendors: npm.

Quick answers

Is CVE-2019-10748 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2019-10748 being exploited in the wild.
How severe is CVE-2019-10748?
Low severity, with a CVSS score of 3.1, published 6 November 2019.
Which products and versions are affected?
sequelize (npm) SEMVER:introduced=0,fixed=3.35.1.
Is there a fix for CVE-2019-10748?
Yes. sequelize (npm): upgrade to 3.35.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2019-10748 attacked?
It is attacked over the network.
Am I affected by CVE-2019-10748?
Check whether you run sequelize (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • sequelize (npm): upgrade to 3.35.1 or later
    npm install sequelize@3.35.1

Technical details

This is a SQL injection vulnerability (CWE-89) in the Sequelize ORM library affecting versions prior to 3.35.1, 4.44.3, and 5.8.11. The vulnerability stems from insufficient sanitization of JSON path keys in the MariaDB and MySQL dialect handlers. An attacker with network access to an application using Sequelize can craft malicious JSON path keys that break out of the intended query context and inject arbitrary SQL statements. No authentication or user interaction is required. Successful exploitation allows arbitrary SQL query execution, enabling data extraction, modification, unauthorized access, or database disruption. Patches are available in sequelize 3.35.1, 4.44.3, and 5.8.11 or later.

Affected products

  • Sequelize Sequelize before 3.35.1, 4.0.0 before 4.44.3, 5.0.0 before 5.8.11

Identifiers

  • CVE-2019-10748
  • GHSA-j9xp-92vc-559j

Timeline

  • 2019-11-06: disclosed
  • 2019-11-06: patched: Patches released for versions 3.35.1, 4.44.3, and 5.8.11

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.