MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities - Nessus
High Plugin ID: 34159This page contains detailed information about the MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.
Plugin Overview
ID: 34159
Name: MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities
Filename: mysql_5_0_67.nasl
Vulnerability Published: N/A
This Plugin Published: 2008-09-11
Last Modification Time: 2018-11-15
Plugin Version: 1.21
Plugin Type: remote
Plugin Family: Databases
Dependencies:
mysql_login.nasl, mysql_version.nasl
Required KB Items [?]: Settings/ParanoidReport
Vulnerability Information
Severity: High
Vulnerability Published: N/A
Patch Published: N/A
CVE [?]: CVE-2007-5969, CVE-2008-0226, CVE-2008-0227, CVE-2008-2079, CVE-2008-3963, CVE-2008-4098
CPE [?]: cpe:/a:mysql:mysql
Synopsis
The remote database server is affected by several issues.
Description
The version of MySQL Community Server 5.0 installed on the remote host is before 5.0.66. Such versions are reportedly affected by the following issues :
- When using a FEDERATED table, a local server could be forced to crash if the remote server returns a result with fewer columns than expected (Bug #29801).
- ALTER VIEW retains the original DEFINER value, even when altered by another user, which could allow that user to gain the access rights of the view (Bug #29908).
- A local user can circumvent privileges through creation of MyISAM tables using the 'DATA DIRECTORY' and 'INDEX DIRECTORY' options to overwrite existing table files in the application's data directory (Bug #32167).
- RENAME TABLE against a table with DATA/INDEX DIRECTORY overwrites the file to which the symlink points (Bug #32111).
- It was possible to force an error message of excessive length, which could lead to a buffer overflow (Bug #32707). - Three vulnerabilities in yaSSL versions 1.7.5 and earlier as used in MySQL could allow an unauthenticated remote attacker to crash the server or to execute arbitrary code provided yaSSL is enabled and the server allows TCP connections (Bug #33814).
- An empty bit-string literal (b'') used in a SQL statement could result in a server crash (Bug #35658).
Solution
Upgrade to MySQL Community Server version 5.0.67.
Public Exploits
Target Network Port(s): 3306
Target Asset(s): Services/mysql
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available
Here's the list of publicly known exploits and PoCs for verifying the MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities vulnerability:
- Metasploit: exploit/linux/mysql/mysql_yassl_hello
[MySQL yaSSL SSL Hello Message Buffer Overflow] - Metasploit: exploit/windows/mysql/mysql_yassl_hello
[MySQL yaSSL SSL Hello Message Buffer Overflow] - Exploit-DB: exploits/linux/remote/9953.rb
[EDB-9953: MySQL 6.0 yaSSL 1.7.5 - Hello Message Buffer Overflow (Metasploit)] - Exploit-DB: exploits/windows/remote/16701.rb
[EDB-16701: MySQL yaSSL (Windows) - SSL Hello Message Buffer Overflow (Metasploit)] - Exploit-DB: exploits/linux/remote/16849.rb
[EDB-16849: MySQL yaSSL (Linux) - SSL Hello Message Buffer Overflow (Metasploit)] - GitHub: https://github.com/ptester36/netology_ib_networks_lesson_9
[CVE-2007-5969] - GitHub: https://github.com/CoolerVoid/Vision
[CVE-2008-2079] - GitHub: https://github.com/CoolerVoid/Vision2
[CVE-2008-2079] - GitHub: https://github.com/tomwillfixit/alpine-cvecheck
[CVE-2008-2079] - GitHub: https://github.com/tomwillfixit/alpine-cvecheck
[CVE-2008-3963] - GitHub: https://github.com/tomwillfixit/alpine-cvecheck
[CVE-2008-4098]
Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.
WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.
Risk Information
CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score: | 7.5 (High) |
Impact Subscore: | 6.4 |
Exploitability Subscore: | 10.0 |
CVSS Temporal Score: | 6.2 (Medium) |
CVSS Environmental Score: | NA (None) |
Modified Impact Subscore: | NA |
Overall CVSS Score: | 6.2 (Medium) |
Go back to menu.
Plugin Source
This is the mysql_5_0_67.nasl nessus plugin source code. This script is Copyright (C) 2008-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
#
# (C) Tenable Network Security, Inc.
#
include("compat.inc");
if (description)
{
script_id(34159);
script_version("1.21");
script_cvs_date("Date: 2018/11/15 20:50:21");
script_cve_id(
"CVE-2007-5969",
"CVE-2008-0226",
"CVE-2008-0227",
"CVE-2008-2079",
"CVE-2008-3963",
"CVE-2008-4098"
);
script_bugtraq_id(26765, 27140, 29106);
script_name(english:"MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities");
script_summary(english:"Checks version of MySQL Community Server 5.0");
script_set_attribute(attribute:"synopsis", value:
"The remote database server is affected by several issues.");
script_set_attribute(attribute:"description", value:
"The version of MySQL Community Server 5.0 installed on the remote host
is before 5.0.66. Such versions are reportedly affected by the
following issues :
- When using a FEDERATED table, a local server could be
forced to crash if the remote server returns a result
with fewer columns than expected (Bug #29801).
- ALTER VIEW retains the original DEFINER value, even
when altered by another user, which could allow that
user to gain the access rights of the view (Bug
#29908).
- A local user can circumvent privileges through creation
of MyISAM tables using the 'DATA DIRECTORY' and 'INDEX
DIRECTORY' options to overwrite existing table files in
the application's data directory (Bug #32167).
- RENAME TABLE against a table with DATA/INDEX DIRECTORY
overwrites the file to which the symlink points (Bug
#32111).
- It was possible to force an error message of excessive
length, which could lead to a buffer overflow (Bug
#32707).
- Three vulnerabilities in yaSSL versions 1.7.5 and
earlier as used in MySQL could allow an unauthenticated
remote attacker to crash the server or to execute
arbitrary code provided yaSSL is enabled and the server
allows TCP connections (Bug #33814).
- An empty bit-string literal (b'') used in a SQL statement
could result in a server crash (Bug #35658).");
script_set_attribute(attribute:"see_also", value:"http://dev.mysql.com/doc/refman/5.0/en/news-5-0-67.html");
script_set_attribute(attribute:"see_also", value:"https://lists.mysql.com/announce/542");
script_set_attribute(attribute:"solution", value:"Upgrade to MySQL Community Server version 5.0.67.");
script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
script_set_attribute(attribute:"exploit_available", value:"true");
script_set_attribute(attribute:"exploit_framework_core", value:"true");
script_set_attribute(attribute:"metasploit_name", value:'MySQL yaSSL SSL Hello Message Buffer Overflow');
script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
script_cwe_id(59, 119, 134, 264);
script_set_attribute(attribute:"plugin_publication_date", value:"2008/09/11");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe", value:"cpe:/a:mysql:mysql");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"Databases");
script_copyright(english:"This script is Copyright (C) 2008-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("mysql_version.nasl", "mysql_login.nasl");
script_require_ports("Services/mysql", 3306);
script_require_keys("Settings/ParanoidReport");
exit(0);
}
include("global_settings.inc");
include("misc_func.inc");
include("mysql_func.inc");
# nb: banner checks of open source software are prone to false-
# positives so only run the check if reporting is paranoid.
if (report_paranoia < 2)
exit(1, "This plugin only runs if 'Report paranoia' is set to 'Paranoid'.");
port = get_service(svc:"mysql", default:3306, exit_on_fail:TRUE);
if (mysql_init(port:port, exit_on_fail:TRUE) == 1)
{
variant = mysql_get_variant();
version = mysql_get_version();
if (
"Community " >< variant &&
strlen(version) &&
version =~ "^5\.0\.([0-9]|[1-5][0-9]|6[0-6])($|[^0-9])"
)
{
if (report_verbosity > 0)
{
report =
'\nThe remote MySQL '+variant+'\'s version is :\n'+
'\n '+version+'\n';
datadir = get_kb_item('mysql/' + port + '/datadir');
if (!empty_or_null(datadir))
{
report += ' Data Dir : ' + datadir + '\n';
}
databases = get_kb_item('mysql/' + port + '/databases');
if (!empty_or_null(databases))
{
report += ' Databases :\n' + databases;
}
security_hole(port:port, extra:report);
}
else security_hole(port);
}
}
mysql_close();
The latest version of this script can be found in these locations depending on your platform:
- Linux / Unix:
/opt/nessus/lib/nessus/plugins/mysql_5_0_67.nasl
- Windows:
C:\ProgramData\Tenable\Nessus\nessus\plugins\mysql_5_0_67.nasl
- Mac OS X:
/Library/Nessus/run/lib/nessus/plugins/mysql_5_0_67.nasl
Go back to menu.
How to Run
Here is how to run the MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities as a standalone plugin via the Nessus web user interface (https://localhost:8834/):
- Click to start a New Scan.
- Select Advanced Scan.
- Navigate to the Plugins tab.
- On the top right corner click to Disable All plugins.
- On the left side table select Databases plugin family.
- On the right side table select MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities plugin ID 34159.
- Specify the target on the Settings tab and click to Save the scan.
- Run the scan.
Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.
Basic usage:
/opt/nessus/bin/nasl mysql_5_0_67.nasl -t <IP/HOST>
Run the plugin with audit trail message on the console:
/opt/nessus/bin/nasl -a mysql_5_0_67.nasl -t <IP/HOST>
Run the plugin with trace script execution written to the console (useful for debugging):
/opt/nessus/bin/nasl -T - mysql_5_0_67.nasl -t <IP/HOST>
Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):
/opt/nessus/bin/nasl -K /tmp/state mysql_5_0_67.nasl -t <IP/HOST>
Go back to menu.
References
BID | SecurityFocus Bugtraq ID: CWE | Common Weakness Enumeration:
- CWE-59 (Weakness) Improper Link Resolution Before File Access ('Link Following')
- CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
- CWE-134 (Weakness) Use of Externally-Controlled Format String
- CWE-264 (Category) Permissions, Privileges, and Access Controls
- https://www.tenable.com/plugins/nessus/34159
- https://lists.mysql.com/announce/542
- http://dev.mysql.com/doc/refman/5.0/en/news-5-0-67.html
- https://vulners.com/nessus/MYSQL_5_0_67.NASL
- 29731 - CentOS 4 / 5 : mysql (CESA-2007:1155)
- 43782 - CentOS 5 : mysql (CESA-2009:1289)
- 44647 - CentOS 4 : mysql (CESA-2010:0110)
- 33492 - Debian DSA-1608-1 : mysql-dfsg-5.0 - authorization bypass
- 34700 - Debian DSA-1662-1 : mysql-dfsg-5.0 - authorization bypass
- 78218 - F5 Networks BIG-IP : MySQL vulnerabilities (SOL8178)
- 29712 - Fedora 8 : mysql-5.0.45-6.fc8 (2007-4465)
- 29714 - Fedora 7 : mysql-5.0.45-6.fc7 (2007-4471)
- 34151 - FreeBSD : mysql -- MyISAM table privileges security bypass vulnerability (388d9ee4-7f22-11dd-a66a-0019666436c2)
- 35339 - FreeBSD : mysql -- privilege escalation and overwrite of the system table information (8c451386-dff3-11dd-a765-0030843d3802)
- 57446 - GLSA-201201-02 : MySQL: Multiple vulnerabilities
- 34374 - Mac OS X Multiple Vulnerabilities (Security Update 2008-007)
- 40945 - Mac OS X Multiple Vulnerabilities (Security Update 2009-005)
- 37407 - Mandriva Linux Security Advisory : mysql (MDVSA-2008:149)
- 36943 - Mandriva Linux Security Advisory : mysql (MDVSA-2009:094)
- 43045 - Mandriva Linux Security Advisory : mysql (MDVSA-2009:326)
- 32137 - MySQL 4.1 < 4.1.24 MyISAM Create Table Privilege Check Bypass
- 29251 - MySQL Community Server 5.0 < 5.0.51 RENAME TABLE Symlink System Table Overwrite
- 29345 - MySQL Community Server < 5.1.23 / 6.0.4 Multiple Vulnerabilities
- 17812 - MySQL < 5.0.88 / 5.1.42 / 5.5.0 / 6.0.14 MyISAM CREATE TABLE Privilege Check Bypass
- 17814 - yaSSL 1.7.5 Buffer Overflow
- 29346 - MySQL Enterprise Server 5.0 < 5.0.52 Multiple Vulnerabilities
- 32138 - MySQL Enterprise Server 5.0 < 5.0.60 MyISAM CREATE TABLE Privilege Check Bypass
- 34727 - MySQL Enterprise Server 5.0 < 5.0.70 Privilege Bypass
- 67624 - Oracle Linux 4 / 5 : mysql (ELSA-2007-1155)
- 67998 - Oracle Linux 4 : mysql (ELSA-2010-0110)
- 29737 - RHEL 4 / 5 : mysql (RHSA-2007:1155)
- 33585 - RHEL 4 : mysql (RHSA-2008:0768)
- 63890 - RHEL 5 : mysql (RHSA-2009:1289)
- 44635 - RHEL 4 : mysql (RHSA-2010:0110)
- 58325 - Ubuntu 8.04 LTS / 10.04 LTS / 10.10 / 11.04 / 11.10 : mysql-5.1, mysql-dfsg-5.0, mysql-dfsg-5.1 vulnerabilities (USN-1397-1)
- 29793 - Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-559-1)
- 44585 - Ubuntu 6.06 LTS / 8.04 LTS / 8.10 / 9.04 / 9.10 : mysql-dfsg-5.0, mysql-dfsg-5.1 vulnerabilities (USN-897-1)
Version
This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file mysql_5_0_67.nasl version 1.21. For more plugins, visit the Nessus Plugin Library.
Go back to menu.