MySQL Query Logging Bypass Vulnerability
BID:16850
Info
MySQL Query Logging Bypass Vulnerability
| Bugtraq ID: | 16850 |
| Class: | Design Error |
| CVE: |
CVE-2006-0903 |
| Remote: | Yes |
| Local: | No |
| Published: | Feb 27 2006 12:00AM |
| Updated: | May 21 2008 08:54PM |
| Credit: | 1dt.w0lf discovered this issue. |
| Vulnerable: |
Ubuntu Ubuntu Linux 5.10 powerpc Ubuntu Ubuntu Linux 5.10 i386 Ubuntu Ubuntu Linux 5.10 amd64 Ubuntu Ubuntu Linux 5.0 4 powerpc Ubuntu Ubuntu Linux 5.0 4 i386 Ubuntu Ubuntu Linux 5.0 4 amd64 Ubuntu Ubuntu Linux 4.1 ppc Ubuntu Ubuntu Linux 4.1 ia64 Ubuntu Ubuntu Linux 4.1 ia32 Turbolinux Turbolinux Workstation 8.0 Turbolinux Turbolinux Server 10.0 x86 Turbolinux Turbolinux Server 10.0 Turbolinux Turbolinux Server 8.0 Turbolinux Turbolinux Server 7.0 Turbolinux Turbolinux Desktop 10.0 Turbolinux Turbolinux FUJI Turbolinux Turbolinux 10 F... TurboLinux Personal TurboLinux Multimedia Turbolinux Home Turbolinux Appliance Server Workgroup Edition 1.0 Turbolinux Appliance Server Hosting Edition 1.0 Turbolinux Appliance Server 1.0 Workgroup Edition Turbolinux Appliance Server 1.0 Hosting Edition Turbolinux Appliance Server 2.0 Trend Micro InterScan VirusWall 8.0 TransSoft Broker FTP Server 8.0 TransSoft Broker FTP Server 7.0 Redhat Enterprise Linux WS 4 Redhat Enterprise Linux ES 4 Redhat Enterprise Linux Desktop Workstation 5 client Redhat Enterprise Linux Desktop 5 client Redhat Enterprise Linux AS 4 Redhat Enterprise Linux 5 server Redhat Desktop 4.0 MySQL AB MySQL 5.0.18 Mandriva Linux Mandrake 2006.0 x86_64 Mandriva Linux Mandrake 2006.0 Mandriva Linux Mandrake 10.2 x86_64 Mandriva Linux Mandrake 10.2 MandrakeSoft Corporate Server 3.0 x86_64 MandrakeSoft Corporate Server 3.0 Debian Linux 3.1 sparc Debian Linux 3.1 s/390 Debian Linux 3.1 ppc Debian Linux 3.1 mipsel Debian Linux 3.1 mips Debian Linux 3.1 m68k Debian Linux 3.1 ia-64 Debian Linux 3.1 ia-32 Debian Linux 3.1 hppa Debian Linux 3.1 arm Debian Linux 3.1 amd64 Debian Linux 3.1 alpha Debian Linux 3.1 Debian Linux 3.0 sparc Debian Linux 3.0 s/390 Debian Linux 3.0 ppc Debian Linux 3.0 mipsel Debian Linux 3.0 mips Debian Linux 3.0 m68k Debian Linux 3.0 ia-64 Debian Linux 3.0 ia-32 Debian Linux 3.0 hppa Debian Linux 3.0 arm Debian Linux 3.0 alpha Debian Linux 3.0 |
| Not Vulnerable: | |
Discussion
MySQL Query Logging Bypass Vulnerability
MySQL is prone to a query-logging-bypass vulnerability. This issue is due to a discrepancy between the handling of NULL bytes in the 'mysql_real_query()' function and in the query-logging functionality.
This issue allows attackers to bypass the query-logging functionality of the database so they can cause malicious SQL queries to be improperly logged. This may help them hide the traces of their malicious activity from administrators.
This issue affects MySQL version 5.0.18; other versions may also be affected.
MySQL is prone to a query-logging-bypass vulnerability. This issue is due to a discrepancy between the handling of NULL bytes in the 'mysql_real_query()' function and in the query-logging functionality.
This issue allows attackers to bypass the query-logging functionality of the database so they can cause malicious SQL queries to be improperly logged. This may help them hide the traces of their malicious activity from administrators.
This issue affects MySQL version 5.0.18; other versions may also be affected.
Exploit / POC
MySQL Query Logging Bypass Vulnerability
An attacker uses standard MySQL client calls to exploit this issue.
PHP code designed to exploit this issue is provided:
mysql_connect(...);
mysql_query('/*'.chr(0).'*/ SELECT * FROM table');
An attacker uses standard MySQL client calls to exploit this issue.
PHP code designed to exploit this issue is provided:
mysql_connect(...);
mysql_query('/*'.chr(0).'*/ SELECT * FROM table');
Solution / Fix
MySQL Query Logging Bypass Vulnerability
Solution:
Please see the referenced advisories for information on obtaining and applying fixes.
Solution:
Please see the referenced advisories for information on obtaining and applying fixes.
References
MySQL Query Logging Bypass Vulnerability
References:
References:
- MySQL Homepage (Oracle)
- RHSA-2006:0544-6 - mysql security update (Red Hat)
- RST/GHC advisory#39 (1dt.w0lf)
- RHSA-2008:0364-9 mysql security and bug fix update (Red Hat)