Impact
An application that was taking non-validated user input, escaping it with mysql_real_escape_string() and sending it to the database using text protocol and big5 character set was vulnerable to SQL injections, even though mysql_real_escape_string() was supposed to prevent them.
Workarounds
Switching to gbk character set can be used as a workaround.
Changing the application to use prepared statements as opposite to interpolating escaped parameters in the query string is always preferable as a general solution to SQL injections.
References
https://jira.mariadb.org/browse/CONC-819
Discovered by
Jun Rong at Calif.io
Impact
An application that was taking non-validated user input, escaping it with
mysql_real_escape_string()and sending it to the database using text protocol and big5 character set was vulnerable to SQL injections, even thoughmysql_real_escape_string()was supposed to prevent them.Workarounds
Switching to gbk character set can be used as a workaround.
Changing the application to use prepared statements as opposite to interpolating escaped parameters in the query string is always preferable as a general solution to SQL injections.
References
https://jira.mariadb.org/browse/CONC-819
Discovered by
Jun Rong at Calif.io