The OpenNET Project
 
Search (keywords):  SOFT ARTICLES TIPS & TRICKS SECURITY
LINKS NEWS MAN DOCUMENTATION


MySQL command-line client HTML injection vulnerability


<< Previous INDEX Search src / Print Next >>
Date: Tue, 30 Sep 2008 10:29:38 +0200
From: Thomas Henlich <thomas@henlich.de.>
To: [email protected]
Subject: MySQL command-line client HTML injection vulnerability
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: antivirus-gw at tyumen.ru

MYSQL COMMAND-LINE CLIENT HTML INJECTION VULNERABILITY

Thomas Henlich <thomas@henlich.de.>

DESCRIPTION

The mysql command-line client does not quote HTML special characters
like < in its output. This allows an attacker who is able to write data
into a table to hide or modify records in the output, and to inject
potentially dangerous code, e. g. Javascript to perform cross-site
scripting or cross-site request forgery attacks.

HOW TO REPRODUCE

$ mysql --html --execute "select '<a>'" ...
<TABLE BORDER=1><TR><TH><a></TH></TR><TR><TD><a></TD></TR></TABLE>

AFFECTED VERSIONS

All.

RESOLUTION

Users are advised to install the available patch from
http://bugs.mysql.com/bug.php?id=27884.

WORKAROUND

If another resolution is not feasible, users are advised to modify their
 SELECT statements to filter out the characters < and &:

SELECT REPLACE(REPLACE(...,'&','&amp;'),'<','&lt;') AS ...;

This workaround is incompatible with the described resolution and should
be reversed after installation of the patch.

TIMELINE

2007-04-17 Opened bug on mysql.com
2008-05-01 Patch available

RESOURCES

The bug is filed on http://bugs.mysql.com/bug.php?id=27884.

This advisory is available from
http://www.henlich.de/it-security/mysql-command-line-client-html-injection-vulnerability.


<< Previous INDEX Search src / Print Next >>



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2025 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру