CVE-2016-6664

HIGH

Oracle MySQL, MariaDB, Percona Server, Percona XtraDB Cluster - Privilege Escalation via Symlink Attack

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2016-6664. PoCs published by Dawid Golunski.

AI-analyzed exploit summary This exploit leverages unsafe error log handling in MySQL/MariaDB/PerconaDB to escalate privileges from the mysql user to root by manipulating the error log file to create a symlink to /etc/ld.so.preload and injecting a shared library that sets SUID permissions on a backdoor shell.

Description

mysqld_safe in Oracle MySQL through 5.5.51, 5.6.x through 5.6.32, and 5.7.x through 5.7.14; MariaDB; Percona Server before 5.5.51-38.2, 5.6.x before 5.6.32-78-1, and 5.7.x before 5.7.14-8; and Percona XtraDB Cluster before 5.5.41-37.0, 5.6.x before 5.6.32-25.17, and 5.7.x before 5.7.14-26.17, when using file-based logging, allows local users with access to the mysql account to gain root privileges via a symlink attack on error logs and possibly other files.

Exploits (1)

exploitdb WORKING POC
by Dawid Golunski · bashlocallinux
https://www.exploit-db.com/exploits/40679

This exploit leverages unsafe error log handling in MySQL/MariaDB/PerconaDB to escalate privileges from the mysql user to root by manipulating the error log file to create a symlink to /etc/ld.so.preload and injecting a shared library that sets SUID permissions on a backdoor shell.

Classification
Working Poc 100%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: MySQL, MariaDB, PerconaDB (versions affected by CVE-2016-6664)
Auth required
Prerequisites: Access to mysql user account · File-based logging enabled (not syslog) · Write permissions to MySQL error log
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (15)

Core 15
Core References
Third Party Advisory vendor-advisory x_refsource_redhat
http://rhn.redhat.com/errata/RHSA-2016-2749.html
Mailing List, Third Party Advisory mailing-list x_refsource_fulldisc
http://seclists.org/fulldisclosure/2016/Nov/4
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/93612
Third Party Advisory vendor-advisory x_refsource_redhat
https://access.redhat.com/errata/RHSA-2018:0574
Third Party Advisory vendor-advisory x_refsource_gentoo
https://security.gentoo.org/glsa/201702-18
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/539695/100/0/threaded
Third Party Advisory vendor-advisory x_refsource_redhat
http://rhn.redhat.com/errata/RHSA-2016-2130.html
Exploit, Third Party Advisory, VDB Entry exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/40679/
Third Party Advisory vendor-advisory x_refsource_redhat
https://access.redhat.com/errata/RHSA-2018:0279
Third Party Advisory vendor-advisory x_refsource_debian
http://www.debian.org/security/2017/dsa-3770
Third Party Advisory vendor-advisory x_refsource_redhat
https://access.redhat.com/errata/RHSA-2017:2192

Scores

CVSS v3 7.0
EPSS 0.0308
EPSS Percentile 86.0%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-59
Status published
Products (4)
mariadb/mariadb 5.5.0 - 5.5.54
oracle/mysql 5.5.0 - 5.5.51
percona/percona_server 5.5 - 5.5.51-38.2
percona/xtradb_cluster 5.5 - 5.5.41-37.0
Published Dec 13, 2016
Tracked Since Feb 18, 2026