Multiple SQL injection vulnerabilities in GLPI 0.90.4
Multiple SQL injection vulnerabilities in GLPI 0.90.4 allow an authenticated remote attacker to execute arbitrary SQL commands by using the [ELIDED] character when the database is configured to use asian encoding (BIG 5). The file ./inc/dbmysql.class.php defines the encoding the database should use. This files uses the "SET NAMES" function which offers the possibility to use a specific encoding. For the proof-of-concept, the attacker targeted the "Surname" form input in the User profile by adding the characters ø (xBFx27) before the SQL code (the request must be sent using Western encoding) : ø', password=61529519452809720693702583126814 -- x. Once received by the server, the request will be sanitized, giving : ø', password=61529519452809720693702583126814 -- x. The value will then be sent to the database with a BIG5 encoding. Here is the critical point, as BIG5 will see the string ø as a single asian character encoded on two bytes. As the single quote isn't escaped anymore, the SQL code will be executed and will set the password of every accounts to the value 61529519452809720693702583126814 (=MD5 hash of "ximaz" string).