MySQL: SQL Injection
1.
Gentoo Linux Security Advisory
Version Information
| Advisory Reference |
GLSA 200606-13 / MySQL |
| Release Date |
June 11, 2006 |
| Latest Revision |
December 13, 2006: 04 |
| Impact |
normal |
| Exploitable |
remote |
| Package |
Vulnerable versions |
Unaffected versions |
Architecture(s) |
| dev-db/mysql |
<
5.0.22 |
>=
5.0.22,
revision >=
4.1.20,
revision >=
4.1.21,
revision >=
4.1.22,
<
4.1 |
All supported architectures
|
Related bugreports:
#135076
Synopsis
MySQL is vulnerable to an SQL Injection flaw in the multi-byte encoding
process.
2.
Impact Information
Background
MySQL is a popular multi-threaded, multi-user SQL server.
Description
MySQL is vulnerable to an injection flaw in mysql_real_escape() when
used with multi-byte characters.
Impact
Due to a flaw in the multi-byte character process, an attacker is still
able to inject arbitary SQL statements into the MySQL server for
execution.
3.
Resolution Information
Workaround
There are a few workarounds available: NO_BACKSLASH_ESCAPES mode as a
workaround for a bug in mysql_real_escape_string(): SET
sql_mode='NO_BACKSLASH_ESCAPES'; SET GLOBAL
sql_mode='NO_BACKSLASH_ESCAPES'; and server command line options:
--sql-mode=NO_BACKSLASH_ESCAPES.
Resolution
All MySQL users should upgrade to the latest version:
Code Listing 3.1: Resolution |
# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-db/mysql-4.1.20"
|
4.
References
|