{"id":"CVE-2016-10556","aliases":["EUVD-2019-0269","GHSA-9c2p-jw8p-f84v"],"status":"published","title":"SQL Injection in sequelize","description":"sequelize is an Object-relational mapping, or a middleman to convert things from Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server into usable data for NodeJS In Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped. This causes potential SQL injection in sequelize 3.19.3 and earlier, where a malicious user could put `[\"test\", \"'); DELETE TestTable WHERE Id = 1 --')\"]` inside of ``` database.query('SELECT * FROM TestTable WHERE Name IN (:names)', { replacements: { names: directCopyOfUserInput } }); ``` and cause the SQL statement to become `SELECT Id FROM Table WHERE Name IN ('test', '\\'); DELETE TestTable WHERE Id = 1 --')`. In Postgres, MSSQL, and SQLite, the backslash has no special meaning. This causes the the statement to delete whichever Id has a value of 1 in the TestTable table.","severity":{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.01297,"percentile":0.70583,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2018-05-29T20:00:00Z","modified":"2026-10-20T10:47:24Z","fixes":[{"ecosystem":"npm","package":"sequelize","fixed_in":["3.20.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"sequelize","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"3.19.3"},{"fixed":"3.20.0"}]}]},{"source":"osv","ecosystem":"npm","package":"sequelize","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.20.0"}]}]}],"products":[{"vendor":"hackerone","product":"sequelize node module"},{"vendor":"sequelizejs","product":"sequelize"}],"references":[{"url":"https://github.com/sequelize/sequelize/issues/5671","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://nodesecurity.io/advisories/102","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-10556","tags":["advisory"]},{"url":"https://github.com/sequelize/sequelize/commit/23952a2b020cc3571f090e67dae7feb084e1be71","tags":["web"]},{"url":"https://github.com/sequelize/sequelize/commits/v3.20.0?after=62e4dacb28a779a190a3e042b971dcd8c7926e49+34\u0026branch=v3.20.0\u0026qualified_name=refs%2Ftags%2Fv3.20.0","tags":["web"]},{"url":"https://github.com/advisories/GHSA-9c2p-jw8p-f84v"}],"sources":{"cve":[{"id":"CVE-2016-10556","description":"sequelize is an Object-relational mapping, or a middleman to convert things from Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server into usable data for NodeJS In Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped. This causes potential SQL injection in sequelize 3.19.3 and earlier, where a malicious user could put `[\"test\", \"'); DELETE TestTable WHERE Id = 1 --')\"]` inside of ``` database.query('SELECT * FROM TestTable WHERE Name IN (:names)', { replacements: { names: directCopyOfUserInput } }); ``` and cause the SQL statement to become `SELECT Id FROM Table WHERE Name IN ('test', '\\'); DELETE TestTable WHERE Id = 1 --')`. In Postgres, MSSQL, and SQLite, the backslash has no special meaning. This causes the the statement to delete whichever Id has a value of 1 in the TestTable table.","status":"published","published":"2018-05-29T20:00:00Z","modified":"2024-09-17T03:47:51.757Z","cwes":["CWE-89"],"updated_at":"2026-11-02T14:33:31.117878Z"}],"euvd":[{"id":"EUVD-2019-0269","description":"sequelize is an Object-relational mapping, or a middleman to convert things from Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server into usable data for NodeJS In Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped. This causes potential SQL injection in sequelize 3.19.3 and earlier, where a malicious user could put `[\"test\", \"'); DELETE TestTable WHERE Id = 1 --')\"]` inside of ``` database.query('SELECT * FROM TestTable WHERE Name IN (:names)', { replacements: { names: directCopyOfUserInput } }); ``` and cause the SQL statement to become `SELECT Id FROM Table WHERE Name IN ('test', '\\'); DELETE TestTable WHERE Id = 1 --')`. In Postgres, MSSQL, and SQLite, the backslash has no special meaning. This causes the the statement to delete whichever Id has a value of 1 in the TestTable table.","status":"published","published":"2018-05-29T20:00:00Z","modified":"2024-09-17T03:47:51Z","updated_at":"2026-11-03T00:28:29.042248Z"}],"ghsa":[{"id":"GHSA-9c2p-jw8p-f84v","title":"SQL Injection in sequelize","description":"Affected versions of `sequelize` cast arrays to strings and fail to properly escape the resulting SQL statement, resulting in a SQL injection vulnerability.\n\n\n## Proof of Concept\nIn Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped.\n\nExample Query:\n```\ndatabase.query('SELECT * FROM TestTable WHERE Name IN (:names)', {\n  replacements: {\n    names: directCopyOfUserInput\n  }\n});\n```\n\nIf the user inputs the value of `:names` as:\n```\n[\"test\", \"'); DELETE TestTable WHERE Id = 1 --')\"]\n```\n\nThe resulting SQL statement will be:\n```sql\nSELECT Id FROM Table WHERE Name IN ('test', '\\'); DELETE TestTable WHERE Id = 1 --')\n```\nAs the backslash has no special meaning in PostgreSQL, MSSQL, or SQLite, the statement will delete the record in TestTable with an Id of 1.\n\n\n## Recommendation\n\nUpdate to version 3.20.0 or later.","status":"published","published":"2019-02-18T23:54:24Z","modified":"2023-09-11T21:48:30Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:37:03.916765Z"}],"nvd":[{"id":"CVE-2016-10556","description":"sequelize is an Object-relational mapping, or a middleman to convert things from Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server into usable data for NodeJS In Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped. This causes potential SQL injection in sequelize 3.19.3 and earlier, where a malicious user could put `[\"test\", \"'); DELETE TestTable WHERE Id = 1 --')\"]` inside of ``` database.query('SELECT * FROM TestTable WHERE Name IN (:names)', { replacements: { names: directCopyOfUserInput } }); ``` and cause the SQL statement to become `SELECT Id FROM Table WHERE Name IN ('test', '\\'); DELETE TestTable WHERE Id = 1 --')`. In Postgres, MSSQL, and SQLite, the backslash has no special meaning. This causes the the statement to delete whichever Id has a value of 1 in the TestTable table.","status":"published","published":"2018-05-29T20:29:00.75Z","modified":"2026-06-17T00:39:55.833Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:03:39.176887Z"}],"osv":[{"id":"CVE-2016-10556","description":"sequelize is an Object-relational mapping, or a middleman to convert things from Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server into usable data for NodeJS In Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped. This causes potential SQL injection in sequelize 3.19.3 and earlier, where a malicious user could put `[\"test\", \"'); DELETE TestTable WHERE Id = 1 --')\"]` inside of ``` database.query('SELECT * FROM TestTable WHERE Name IN (:names)', { replacements: { names: directCopyOfUserInput } }); ``` and cause the SQL statement to become `SELECT Id FROM Table WHERE Name IN ('test', '\\'); DELETE TestTable WHERE Id = 1 --')`. In Postgres, MSSQL, and SQLite, the backslash has no special meaning. This causes the the statement to delete whichever Id has a value of 1 in the TestTable table.","status":"published","published":"2018-05-29T20:29:00.75Z","modified":"2026-10-20T10:47:24.839717362Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:01.531338Z"},{"id":"GHSA-9c2p-jw8p-f84v","title":"SQL Injection in sequelize","description":"Affected versions of `sequelize` cast arrays to strings and fail to properly escape the resulting SQL statement, resulting in a SQL injection vulnerability.\n\n\n## Proof of Concept\nIn Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped.\n\nExample Query:\n```\ndatabase.query('SELECT * FROM TestTable WHERE Name IN (:names)', {\n  replacements: {\n    names: directCopyOfUserInput\n  }\n});\n```\n\nIf the user inputs the value of `:names` as:\n```\n[\"test\", \"'); DELETE TestTable WHERE Id = 1 --')\"]\n```\n\nThe resulting SQL statement will be:\n```sql\nSELECT Id FROM Table WHERE Name IN ('test', '\\'); DELETE TestTable WHERE Id = 1 --')\n```\nAs the backslash has no special meaning in PostgreSQL, MSSQL, or SQLite, the statement will delete the record in TestTable with an Id of 1.\n\n\n## Recommendation\n\nUpdate to version 3.20.0 or later.","status":"published","published":"2019-02-18T23:54:24Z","modified":"2023-11-08T03:58:12.386286Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:43.524801Z"}]}}
