Description
Race condition in Oracle MySQL before 5.5.52, 5.6.x before 5.6.33, 5.7.x before 5.7.15, and 8.x before 8.0.1; MariaDB before 5.5.52, 10.0.x before 10.0.28, and 10.1.x before 10.1.18; 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 allows local users with certain permissions to gain privileges by leveraging use of my_copystat by REPAIR TABLE to repair a MyISAM table.
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 | mariadb-10.0 | 10.0.28-0+deb8u1 | DSA-3711-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | mariadb-10.0 | 10.0.28-0ubuntu0.16.04.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 | — |
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 |
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 SP2 | mariadb | 10.0.28-17.2 | SUSE-SU-2016:2933-1 |
| SLES 12 SP1 | mariadb | 10.0.28-17.2 | SUSE-SU-2016:2933-1 |
| SLES 12 | mariadb | 10.0.28-20.16.2 | SUSE-SU-2016:2932-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 SP2 | mariadb | 10.0.28-17.2 | SUSE-SU-2016:2933-1 |
| SLES for SAP 12 SP1 | mariadb | 10.0.28-17.2 | SUSE-SU-2016:2933-1 |
| SLES for SAP 12 | mariadb | 10.0.28-20.16.2 | SUSE-SU-2016:2932-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 |
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.x/5.6.x/5.7.x - 'mysql' System User Privilege Escalation / Race Condition EDB-40678 · local · Nov 1, 2016
GitHub 1 repository
-
firebroo/CVE-2016-6663 ★ 5 · Nov 2, 2016
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 13
- RHSA-2017:0184 Red Hat Security Advisory: mysql 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:2928 Red Hat Security Advisory: rh-mariadb101-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
- DSA-3711-1 mariadb-10.0 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-RU-2023:4991-1 Recommended update for mariadb104 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2933-1 Recommended update for mariadb 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:2932-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
- RHSA-2016:2749 vendor-advisory
- https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-52.html
- RHSA-2017:0184 vendor-advisory
- 20161101 MySQL / MariaDB / PerconaDB - Privilege Escalation / Race Condition Exploit [CVE-2016-6663 / OCVE-2016-5616] mailing-list
- RHSA-2016:2131 vendor-advisory
- https://github.com/mysql/mysql-server/commit/4e5473862e6852b0f3802b0cd0c6fa10b5253291
- https://mariadb.com/kb/en/mariadb/mariadb-5552-release-notes/
- https://www.percona.com/blog/2016/11/02/percona-responds-to-cve-2016-6663-and-cve-2016-6664/
- http://www.oracle.com/technetwork/security-advisory/cpuoct2016-2881722.html
- 40678 exploit
- RHSA-2016:2130 vendor-advisory
- RHSA-2016:2927 vendor-advisory
- [oss-security] 20161025 Re: CVE-2016-6662 - MySQL Remote Root Code Execution / Privilege Escalation ( 0day ) mailing-list
- https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-33.html
- 92911 vdb-entry
- 93614 vdb-entry
- RHSA-2016:2595 vendor-advisory
- https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html
- https://mariadb.com/kb/en/mariadb/mariadb-10118-release-notes/
- https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-15.html
- https://github.com/MariaDB/server/commit/347eeefbfc658c8531878218487d729f4e020805
- RHSA-2016:2928 vendor-advisory
- https://mariadb.com/kb/en/mariadb/mariadb-10028-release-notes/
- https://legalhackers.com/advisories/MySQL-Maria-Percona-PrivEscRace-CVE-2016-6663-5616-Exploit.html