Critical MySQL flaws can allow attackers to hack into your server

Pierluigi Paganini November 03, 2016

The security expert Dawid Golunski disclosed critical vulnerabilities in MySQL, MariaDB and PerconaDB can lead fully compromise of servers.

Critical vulnerabilities affecting the MySQL, MariaDB and PerconaDB can lead fully compromise of servers. The flaws could be exploited by attackers to arbitrary code execution, root privilege escalation and, of course, server compromise.

Dawid Golunski (@dawid_golunski) from Legal Hackers has disclosed this week details about the vulnerabilities, including the proof-of-concept exploits for two flaws.

Both vulnerabilities affect MySQL 5.5.51 and earlier, 5.6.32 and earlier, and 5.7.14 and earlier, they also affect MySQL database forks, including Percona Server and MariaDB.

mysql-zero-day-vulnerabilities

The first vulnerability tracked as CVE-2016-6663 is a privilege escalation/race condition flaw, a local attacker could exploit it to escalate his privileges and execute arbitrary code.

“The vulnerability can allow a local system user with access to the affected database in the context of a low-privileged account (CREATE/INSERT/SELECT grants) to escalate their privileges and execute arbitrary code as the database system user (typically ‘mysql‘).”  states the security advisory published on legalhackers.com. “Successful exploitation would allow an attacker to gain access to all of the databases stored on the affected database server.”

Golunski noticed that an attacker could fully compromise the target server by chaining the flaw with the other privilege escalation vulnerabilities (CVE-2016-6662 and CVE-2016-6664) he has discovered in September.

The second vulnerability discovered by Golunski is a root privilege escalation flaw, tracked as tracked as CVE-2016-6663, that can be exploited along with the race condition bug.

“MySQL-based databases including MySQL, MariaDB and PerconaDB are affected by a privilege escalation vulnerability which can let attackers who have gained access to mysql system user to further escalate their privileges to root user allowing them to fully compromise the system. The vulnerability stems from unsafe file handling of error logs and other files.” reads the security advisory.

The flaw resides in the way error logs and other files are managed, the error.log file performs unsafe file operations that can be exploited by attackers to be replaced with an arbitrary system file.

The video PoC will be published soon at the following link:

https://legalhackers.com/videos/MySQL-MariaDB-PerconaDB-PrivEsc-Race-CVE-2016-6663-5616-6664-5617-Exploits.html

https://legalhackers.com/videos/MySQL-MariaDB-PerconaDB-PrivEsc-Race-CVE-2016-6663-5616-6664-5617-Exploits.html

[adrotate banner=”9″]

Pierluigi Paganini

(Security Affairs – MySQL, hacking)



you might also like

leave a comment