What’s Vulnerable › Vulnerabilities
CVE-2016-6662
- Severity: critical (CVSS 9.8 v3.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 67.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2016-09-20 · updated 2026-06-17
- Weakness: CWE-264
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.
Affected products
- Debian Linux: 8.0
- MariaDB: from 5.5.20 before 5.5.51; from 10.0.0 before 10.0.27; from 10.1.0 before 10.1.17 — fixed in 10.0.27, 10.1.17, 5.5.51
- MySQL Server: from 5.5.0 through 5.5.52; from 5.6.0 through 5.6.33; from 5.7.0 through 5.7.15
- Percona Server: from 5.5 before 5.5.51-38.1; from 5.6 before 5.6.32-78.0; from 5.7 before 5.7.14-7 — fixed in 5.5.51-38.1, 5.6.32-78.0, 5.7.14-7
- Red Hat Enterprise Linux: 7.0
- RedHat Enterprise Linux Desktop: 6.0, 7.0
- RedHat Enterprise Linux Server: 6.0
- RedHat Enterprise Linux Server Aus: 7.3, 7.4, 7.6
- RedHat Enterprise Linux Server Eus: 7.3, 7.4, 7.5, 7.6
- RedHat Enterprise Linux Server Tus: 7.3, 7.6
- RedHat Enterprise Linux Workstation: 6.0, 7.0
- OpenStack: 5.0, 6.0, 7.0, 8, 9
How to fix
Upgrade to a fixed version: MariaDB 10.0.27, 10.1.17, 5.5.51; Percona Server 5.5.51-38.1, 5.6.32-78.0, 5.7.14-7. Check the vendor advisory for mitigations.
References
- http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html
- http://rhn.redhat.com/errata/RHSA-2016-2058.html
- http://rhn.redhat.com/errata/RHSA-2016-2059.html
- http://rhn.redhat.com/errata/RHSA-2016-2060.html
- http://rhn.redhat.com/errata/RHSA-2016-2061.html
- http://rhn.redhat.com/errata/RHSA-2016-2062.html
- http://rhn.redhat.com/errata/RHSA-2016-2077.html
- http://rhn.redhat.com/errata/RHSA-2016-2130.html
- http://rhn.redhat.com/errata/RHSA-2016-2131.html
- http://rhn.redhat.com/errata/RHSA-2016-2595.html
- http://rhn.redhat.com/errata/RHSA-2016-2749.html
- http://rhn.redhat.com/errata/RHSA-2016-2927.html
Get alerted when CVE-2016-6662 or the next vulnerability affects your stack