GLSA 200606-13: MySQL: SQL Injection

Severity:normal
Title:MySQL: SQL Injection
Date:06/11/2006
Bugs: #135076
ID:200606-13

Synopsis

MySQL is vulnerable to an SQL Injection flaw in the multi-byte encoding process.

Background

MySQL is a popular multi-threaded, multi-user SQL server.

Affected packages

Package Vulnerable Unaffected Architecture(s)
dev-db/mysql < 5.0.22 >= 5.0.22 All supported architectures

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.

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:

    # emerge --sync
    # emerge --ask --oneshot --verbose ">=dev-db/mysql-4.1.20"

References

Availability

This GLSA and any updates to it are available for viewing at the Gentoo Security Website: http://security.gentoo.org/glsa/glsa-200606-13.xml

Concerns?

Security is a primary focus of Gentoo Linux and ensuring the confidentiality and security of our users machines is of utmost importance to us. Any security concerns should be addressed to security@gentoo.org or alternatively, you may file a bug at https://bugs.gentoo.org.

License

Copyright 2010 Gentoo Foundation, Inc; referenced text belongs to its owner(s). The contents of this document are licensed under the Creative Commons - Attribution / Share Alike license.

Thank you!