Advisory

GHSA-m9jw-237r-gvfv

Also known as: CVE-2019-10752

Summary

SQL Injection in sequelize

Details

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:

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2019-10-25 19:43 UTC
Modified
2024-11-13 01:11 UTC

Affected packages and fixes

sequelize

npm · All systems

Affected

  • introduced 0, fixed 4.44.3 (semver)

Fixed versions

4.44.3

Fix

sequelize

npm · All systems

Affected

  • introduced 5.0.0, fixed 5.15.1 (semver)

Fixed versions

5.15.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences