CWE Code: 89
Vulnerability Type: sql_injection
CVSS Score: 5.0
CWE Name:  Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Summary: 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.
Access Authentication: NONE
Access Complexity: LOW
Access Vector: NETWORK
Impact (C/I/A): NONE/NONE/PARTIAL
Published Date: 2018-05-29
Last Modified Date: 2019-10-09
You are a cybersecurity expert assistant. Provide detailed information about vulnerabilities in a clear and structured format.
system
Please provide details about this vulnerability:  Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
user
CWE Code: 89
Vulnerability Type: sql_injection
CVSS Score: 5.0
CWE Name:  Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Summary: 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.
Access Authentication: NONE
Access Complexity: LOW
Access Vector: NETWORK
Impact (C/I/A): NONE/NONE/PARTIAL
Published Date: 2018-05-29
Last Modified Date: 2019-10-09
assistant