CVE-2016-10550: Sequelize SQL Injection Vulnerability
HIGHCVE-2016-10550 is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Sequelize libraries in the npm ecosystem. The issue involves sql injection in sequelize. Remediation is available by upgrading affected packages to version 3.17.0.
CVE-2016-10550 at a Glance
How to Fix CVE-2016-10550
To remediate this vulnerability, upgrade all affected Sequelize dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install sequelize@3.17.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls sequelize
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2016-10550, inspect your project dependencies using npm:
npm ls sequelize
Analyze the terminal output to locate any version of Sequelize in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.17.0), your application is affected.
Note: The npm ls sequelize command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Sequelize, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2016-10550 Affected Sequelize Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sequelize
|
npm |
< 3.17.0
|
3.17.0
|
References
Frequently Asked Questions
What is CVE-2016-10550?
Which Sequelize versions are affected?
What version fixes CVE-2016-10550?
Is sequelize affected?
What CWE is associated with CVE-2016-10550?
How can I check npm dependencies for CVE-2016-10550?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-98pq-pmw9-4gpm",
"modified" : "2020-08-31T18:11:11Z",
"published" : "2019-02-18T23:54:34Z",
"aliases" : [ "CVE-2016-10550" ],
"summary" : "SQL Injection in sequelize",
"details" : "Affected versions of `sequelize` are vulnerable to SQL Injection in locations where user input is passed into the `limit` or `order` parameters of `sequelize` query calls, such as `findOne` or `findAll`.\n\n\n\n## Recommendation\n\nUpdate to version 3.17.0 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "sequelize"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.17.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10550"
}, {
"type" : "WEB",
"url" : "https://github.com/sequelize/sequelize/pull/5167/commits/f282d85e60e3df5e57ecdb82adccb4eaef404f03"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-98pq-pmw9-4gpm"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/112"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:27:57Z",
"nvd_published_at" : null
}
}