Security Experts:

Critical Privilege Escalation Flaws Found in MySQL

Database management systems MySQL, MariaDB and PerconaDB are affected by a couple of serious privilege escalation vulnerabilities. The developers of the vulnerable software have released updates to address the flaws.

The researcher who discovered the security holes is Dawid Golunski. The expert revealed in September that he had discovered a serious arbitrary code execution vulnerability in MySQL (CVE-2016-6662), which Oracle had failed to patch in more than 40 days after being notified of its existence. Golunski noted at the time that he had also found another flaw, tracked as CVE-2016-6663, which made exploitation of CVE-2016-6662 easier.

Last week, the researcher disclosed the details of CVE-2016-6663, which Oracle tracks as CVE-2016-5616. The weakness is a race condition that allows a local user with low-privilege access to escalate privileges and execute arbitrary code with the permissions of the database system user (e.g. “mysql”).

Once this vulnerability is exploited, the attacker can escalate privileges even further by leveraging CVE-2016-6662 or a new flaw tracked as CVE-2016-6664, or CVE-2016-5617 by Oracle.

According to Golunski, a malicious actor can chain CVE-2016-6663 with CVE-2016-6662 or CVE-2016-6664 to escalate privileges to root and fully compromise the targeted system. The expert has published proof-of-concept (PoC) exploits and a video showing how the attack works.

“This vulnerability [CVE-2016-6663] could for example be exploited by malicious users in a shared hosting environment where each user is supposed to have access to only one database assigned to them,” Golunski explained. “It could also be exploited by attackers who have managed to find a vulnerability in a website and gained access to the target system as a low-privileged user (such as apache/www-data).”

In the case of Oracle MySQL, the vulnerabilities affect versions 5.5.51 and earlier, 5.6.32 and earlier, and 5.7.14 and earlier. Oracle released fixes with the October critical patch updates.

Percona informed customers last week that it updated Percona Server for MySQL and Percona XtraDB Cluster to address the vulnerabilities found by Golunski. MariaDB has only patched CVE-2016-6663, arguing that CVE-2016-6664 is not exploitable by itself. The company will address the latter issue in an upcoming maintenance release.

Related Reading: Vulnerability Impacts Web-Exposed SAP Systems

Related Reading: Critical Vulnerabilities Patched in Joomla

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.