# MySQL Authentication Vulnerabilities



## jgvernonco (Sep 13, 2003)

MySQL Authentication Vulnerabilities

SECUNIA ADVISORY ID:
SA12020

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

CRITICAL:
Moderately critical

IMPACT:
Security Bypass, Privilege escalation

WHERE:
From local network

SOFTWARE:
MySQL 4.x
http://secunia.com/product/404/

DESCRIPTION:
Chris Anley has reported two vulnerabilities in MySQL, allowing
malicious people to gain access to the database or the local system.

1) MySQL fails to properly verify passwords if the client has set a
specific client capability flag and specifies a "passwd_len" of NULL.
This causes MySQL to accept a NULL password as a valid password and
authenticates the user.

Successful exploitation requires that the attacker knows a valid
username.

2) A boundary error within the handling of "scramble" strings can
reportedly be exploited to execute arbitrary code if the attacker
knows a password hash or through brute forcing.

The vulnerabilities only affect beta / developement branches of MySQL
4.1.x and MySQL 5.

NOTE: Secunia doesn't recommend installing beta and development
software on production systems and doesn't normally issue advisories
regarding such software. However, an exception has been made in this
case due to the potential attention this issue may receive.

SOLUTION:
MySQL production releases 3.x and 4.0.x are not affected.

The vulnerabilities has been fixed in version 4.1.3-beta.

PROVIDED AND/OR DISCOVERED BY:
Chris Anley, NGSSoftware

ORIGINAL ADVISORY:
http://www.nextgenss.com/advisories/mysql-authbypass.txt


----------

