MySQL < 4.0.21 mysql_real_connect() Function Remote Overflow

This script is Copyright (C) 2004-2014 Tenable Network Security, Inc.


Synopsis :

The remote database server is affected by a remote code execution
vulnerability.

Description :

The remote host is running a version of MySQL that is older than
4.0.21.

MySQL is a database that runs on both Linux/BSD and Windows platforms.
This version is vulnerable to a length overflow within it's
mysql_real_connect() function. The overflow is due to an error in the
processing of a return Domain (DNS) record. An attacker, exploiting
this flaw, would need to control a DNS server, which would be queried
by the MySQL server. A successful attack would give the attacker
the ability to execute arbitrary code on the remote machine.

See also :

http://bugs.mysql.com/bug.php?id=4017
http://marc.info/?l=bugtraq&m=110140517515735&w=2

Solution :

Upgrade to MySQL 4.0.21 or newer.

Risk factor :

Critical / CVSS Base Score : 10.0
(CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C)
CVSS Temporal Score : 7.4
(CVSS2#E:U/RL:OF/RC:C)
Public Exploit Available : false

Family: Databases

Nessus Plugin ID: 14319 ()

Bugtraq ID: 10981

CVE ID: CVE-2004-0836