SecurityTeam US
 
 Welcome to SecurityTeam US
 Monday, February 06 2012 @ 12:42 PM EST

MySQL Privilege Escalation and Command Execution Vulnerabilities

   
Database ServersStefano Di Paola has reported two vulnerabilities in MySQL, which potentially can be exploited by malicious users to compromise a vulnerable system and by malicious, local users to perform certain actions on a vulnerable system with escalated privileges.

1) An input validation error in the "udf_init()" function in "sql_udf.cc" causes the "dl" field of the "mysql.func" table to not be properly sanitized before being used to load libraries. This can be exploited by manipulating the "mysql" administrative database directly via a "INSERT INTO" statement instead of using "CREATE FUNCTION".

Successful exploitation allows loading a malicious library from an arbitrary location, but requires "INSERT" and "DELETE" permissions on the "mysql" administrative database.

NOTE: This can be exploited remotely if a user has privileges to create local files via a "SELECT ... INTO OUTFILE" statement.

2) Temporary files are created insecurely with the "CREATE TEMPORARY TABLE" command and can be exploited via symlink attacks to overwrite arbitrary files with the privileges of MySQL.

The vulnerabilities have been reported in versions 4.0.23, and 4.1.10 and prior.

SOFTWARE:
MySQL 4.0.23 and prior
MySQL 4.1.10 and prior

SOLUTION:
MySQL version 4.0.24 and 4.1.10a (not released yet):
http://dev.mysql.com/downloads/

Do not grant untrusted users privileges to perform "CREATE TEMPORARY TABLE" statements and manipulate the "mysql" administrative database.

PROVIDED AND/OR DISCOVERED BY:
Nico Steinhardt

ORIGINAL ADVISORY:
iDEFENSE:
http://www.idefense.com/application/poi/display?id=216&type=vulnerabilities

VERIFY ADVISORY:
http://secunia.com/advisories/14547/

Secunia Security Advisories

 

What's Related

Story Options

MySQL Privilege Escalation and Command Execution Vulnerabilities | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
 Copyright © 2012 SecurityTeam US
 All trademarks and copyrights on this page are owned by their respective owners.
  Get Firefox!
Dedicated Servers
Created this page in 0.15 seconds