Description
Oracle MySQL through 5.5.52, 5.6.x through 5.6.33, and 5.7.x through 5.7.15; MariaDB before 5.5.51, 10.0.x before 10.0.27, and 10.1.x before 10.1.17; and Percona Server before 5.5.51-38.1, 5.6.x before 5.6.32-78.0, and 5.7.x before 5.7.14-7 allow local users to create arbitrary configurations and bypass certain protection mechanisms by setting general_log_file to a my.cnf configuration. NOTE: this can be leveraged to execute arbitrary code with root privileges by setting malloc_lib. NOTE: the affected MySQL version information is from Oracle's October 2016 CPU. Oracle has not commented on third-party claims that the issue was silently patched in MySQL 5.5.52, 5.6.33, and 5.7.15.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 8 | mysql-5.5 | 5.5.52-0+deb8u1 | DSA-3666-1 |
| Debian 7 | mysql-5.5 | 5.5.52-0+deb7u1 | DLA-624-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | mariadb-10.0 | 10.0.27-0ubuntu0.16.04.1 | — |
| Ubuntu 16.04 LTS | mysql-5.7 | 5.7.15-0ubuntu0.16.04.1 | USN-3078-1 |
| Ubuntu 16.04 LTS | percona-server-5.6 | No fix yet | — |
| Ubuntu 16.04 LTS | percona-xtradb-cluster-5.6 | 5.6.34-26.19-0ubuntu0.16.04.1 | — |
| Ubuntu 14.04 LTS | mariadb-5.5 | 5.5.52-1ubuntu0.14.04.1 | — |
| Ubuntu 14.04 LTS | mysql-5.5 | 5.5.52-0ubuntu0.14.04.1 | USN-3078-1 |
| Ubuntu 14.04 LTS | mysql-5.6 | 5.6.33-0ubuntu0.14.04.1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | mariadb +7 | 1:5.5.52-1.el7 | RHSA-2016:2595 |
| RHEL 6 | mysql +7 | 5.1.73-8.el6_8 | RHSA-2017:0184 |
| RHEL 2 | mariadb55-mariadb +5 | 5.5.53-1.el6 | RHSA-2016:2131 |
| RHEL 2 | mysql55-mysql +5 | 5.5.52-1.el6 | RHSA-2016:2130 |
| RHEL 2 | rh-mariadb100-mariadb +8 | 1:10.0.28-5.el6 | RHSA-2016:2927 |
| RHEL 2 | rh-mariadb101-mariadb +9 | 1:10.1.19-6.el6 | RHSA-2016:2928 |
| RHEL 2 | rh-mysql56-mysql +7 | 5.6.34-2.el6 | RHSA-2016:2749 |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat OpenStack 9 | mariadb-galera +2 | 1:5.5.42-5.el7ost | RHSA-2016:2062 |
| Red Hat OpenStack 8 | mariadb-galera +2 | 1:5.5.42-5.el7ost | RHSA-2016:2077 |
| Red Hat OpenStack 7 | mariadb-galera +2 | 1:5.5.42-5.el7ost | RHSA-2016:2061 |
| Red Hat OpenStack 6 | mariadb-galera +2 | 1:5.5.42-1.2.el7ost | RHSA-2016:2060 |
| Red Hat OpenStack 5 | mariadb-galera +2 | 5.5.42-1.1.el6ost | RHSA-2016:2059, RHSA-2016:2058 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP1 | mariadb104 | 10.4.30-150100.3.5.10 | SUSE-RU-2023:3956-1 |
| SLES 15 SP1 | python-mysqlclient | 1.4.6-150100.3.3.7 | SUSE-RU-2023:3956-1 |
| SLES 12 SP5 | lz4 | 1.8.0-3.5.2 | SUSE-RU-2023:4991-1 |
| SLES 12 SP5 | mariadb-connector-c | 3.1.22-2.35.1 | SUSE-RU-2023:4991-1 |
| SLES 12 SP5 | mariadb104 | 10.4.30-8.5.46 | SUSE-RU-2023:4991-1 |
| SLES 12 SP5 | python-mysqlclient | 1.3.14-8.9.2 | SUSE-RU-2023:4991-1 |
| SLES 12 SP1 | mariadb | 10.0.27-12.1 | SUSE-SU-2016:2404-1 |
| SLES 12 | mariadb | 10.0.27-20.13.1 | SUSE-SU-2016:2395-1 |
| SLES 11 SP4 | mysql | 5.5.52-0.27.1 | SUSE-SU-2016:2780-1, SUSE-SU-2016:2343-1 |
Show 11 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 11 SP3 | mysql | 5.5.52-0.27.1 | SUSE-SU-2016:2343-1 |
| SLES for SAP 15 SP1 | mariadb104 | 10.4.30-150100.3.5.10 | SUSE-RU-2023:3956-1 |
| SLES for SAP 15 SP1 | python-mysqlclient | 1.4.6-150100.3.3.7 | SUSE-RU-2023:3956-1 |
| SLES for SAP 12 SP5 | lz4 | 1.8.0-3.5.2 | SUSE-RU-2023:4991-1 |
| SLES for SAP 12 SP5 | mariadb-connector-c | 3.1.22-2.35.1 | SUSE-RU-2023:4991-1 |
| SLES for SAP 12 SP5 | mariadb104 | 10.4.30-8.5.46 | SUSE-RU-2023:4991-1 |
| SLES for SAP 12 SP5 | python-mysqlclient | 1.3.14-8.9.2 | SUSE-RU-2023:4991-1 |
| SLES for SAP 12 SP1 | mariadb | 10.0.27-12.1 | SUSE-SU-2016:2404-1 |
| SLES for SAP 12 | mariadb | 10.0.27-20.13.1 | SUSE-SU-2016:2395-1 |
| SLES for SAP 11 SP4 | mysql | 5.5.52-0.27.1 | SUSE-SU-2016:2780-1, SUSE-SU-2016:2343-1 |
| SLE HPC 15 SP1 | mariadb104 | 10.4.30-150100.3.5.10 | SUSE-RU-2023:3956-1 |
| SLE HPC 15 SP1 | python-mysqlclient | 1.4.6-150100.3.3.7 | SUSE-RU-2023:3956-1 |
| SUSE OpenStack Cloud 5 | mysql | 5.5.52-0.27.1 | SUSE-SU-2016:2343-1 |
| SUSE Manager Proxy 2.1 | mysql | 5.5.52-0.27.1 | SUSE-SU-2016:2343-1 |
| SUSE Manager 2.1 | mysql | 5.5.52-0.27.1 | SUSE-SU-2016:2343-1 |
| SUSE Linux Enterprise Point of Sale 11 SP3 | mysql | 5.5.52-0.27.1 | SUSE-SU-2016:2343-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.3 | mariadb | 10.1.17-r0 | — |
| Alpine v3.2 | mariadb | 5.5.51-r0 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | mariadb +7 | 1:5.5.52-1.el7 | ELSA-2016-2595 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- MySQL / MariaDB / PerconaDB 5.5.51/5.6.32/5.7.14 - Code Execution / Privilege Escalation EDB-40360 · local · Sep 12, 2016
GitHub 6 repositories
-
MAYASEVEN/CVE-2016-6662 ★ 28 · May 1, 2017
From SQL injection to root shell with CVE-2016-6662 by MaYaSeVeN
-
Ashrafdev/MySQL-Remote-Root-Code-Execution ★ 9 · Sep 20, 2016
0ldSQL_MySQL_RCE_exploit.py (ver. 1.0) (CVE-2016-6662) MySQL Remote Root Code Execution / Privesc PoC Exploit For testing purposes only. Do no harm.
-
boompig/cve-2016-6662 ★ 1 · Mar 19, 2017
-
meersjo/ansible-mysql-cve-2016-6662 ★ 1 · Sep 15, 2016
Simple ansible playbook to patch mysql servers against CVE-2016-6662
-
KosukeShimofuji/CVE-2016-6662 ★ 0 · Sep 16, 2016
research CVE-2016-6662
-
konstantin-kelemen/mysqld_safe-CVE-2016-6662-patch ★ 0 · Sep 14, 2016
MySQL server CVE-2016-6662 patch playbook
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 24
- WID-SEC-2026-3894 Oracle MySQL: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 13, 2026
- RHSA-2017:0184 Red Hat Security Advisory: mysql security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2928 Red Hat Security Advisory: rh-mariadb101-mariadb security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2927 Red Hat Security Advisory: rh-mariadb100-mariadb security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2749 Red Hat Security Advisory: rh-mysql56-mysql security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2595 Red Hat Security Advisory: mariadb security and bug fix update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2131 Red Hat Security Advisory: mariadb55-mariadb security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2130 Red Hat Security Advisory: mysql55-mysql security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2077 Red Hat Security Advisory: mariadb-galera security and bug fix update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2061 Red Hat Security Advisory: mariadb-galera security and bug fix update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2062 Red Hat Security Advisory: mariadb-galera security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2060 Red Hat Security Advisory: mariadb-galera security and bug fix update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2058 Red Hat Security Advisory: mariadb-galera security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:2059 Red Hat Security Advisory: mariadb-galera security and bug fix update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- USN-3078-1 mysql-5.5, mysql-5.7 vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-624-1 mysql-5.5 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-3666-1 mysql-5.5 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2016:2780-1 Security update for mysql SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-RU-2023:4991-1 Recommended update for mariadb104 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2404-1 Security update for mariadb SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2343-1 Security update for mysql SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-RU-2023:3956-1 Recommended update for mariadb104 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2395-1 Security update for mariadb SUSE / openSUSE Security Updates · Feb 4, 2026
- ELSA-2016-2595 Important: mariadb security and bug fix update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Nov 9, 2016
References
- https://mariadb.com/kb/en/mariadb/mariadb-10027-release-notes/
- RHSA-2016:2749 vendor-advisory
- RHSA-2017:0184 vendor-advisory
- RHSA-2016:2131 vendor-advisory
- RHSA-2016:2060 vendor-advisory
- https://mariadb.com/kb/en/mariadb/mariadb-10117-release-notes/
- https://mariadb.com/kb/en/mariadb/mariadb-5551-release-notes/
- https://jira.mariadb.org/browse/MDEV-10465
- 92912 vdb-entry
- 20160912 CVE-2016-6662 - MySQL Remote Root Code Execution / Privilege Escalation ( 0day ) mailing-list
- GLSA-201701-01 vendor-advisory
- DSA-3666 vendor-advisory
- http://www.oracle.com/technetwork/security-advisory/cpuoct2016-2881722.html
- RHSA-2016:2130 vendor-advisory
- RHSA-2016:2077 vendor-advisory
- RHSA-2016:2927 vendor-advisory
- RHSA-2016:2059 vendor-advisory
- http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html
- https://www.percona.com/blog/2016/09/12/percona-server-critical-update-cve-2016-6662/
- RHSA-2016:2062 vendor-advisory
- RHSA-2016:2595 vendor-advisory
- 1036769 vdb-entry
- RHSA-2016:2061 vendor-advisory
- [oss-security] 20160912 CVE-2016-6662 - MySQL Remote Root Code Execution / Privilege Escalation ( 0day ) mailing-list
- 40360 exploit
- RHSA-2016:2928 vendor-advisory
- RHSA-2016:2058 vendor-advisory