CVE-2016-6662: Critical severity Oracle MySQL vulnerability

Published Sep 12, 2016
·
Updated

A vulnerability in MySQL was found that allows:

1. injecting malicious configuration into existing MySQL configuration files on systems with weak/improper permissions (configs owned by/writable by mysql user)

2. creating new configuration files within a MySQL data directory (writable by MySQL by default) on default MySQL installs without the need to rely on improper config permisions.

3. gaining access to logging functions (normally only available to MySQL admin users) to attackers with only SELECT/FILE permissions on all of the default MySQL installations and thus be in position to add/modify MySQL config files.

Public via:

http://seclists.org/oss-sec/2016/q3/481

External References:

https://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.txt

Other sources

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 generallogfile to a my.cnf configuration. NOTE: this can be leveraged to execute arbitrary code with root privileges by setting malloclib. 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.

— MITRE

Affected Software

38 affected componentsFixes available
Oracle MySQL>=5.5.0<=5.5.52
Oracle MySQL>=5.6.0<=5.6.33
Oracle MySQL>=5.7.0<=5.7.15
Percona Percona Server>=5.5<5.5.51-38.1
Percona Percona Server>=5.6<5.6.32-78.0
Percona Percona Server>=5.7<5.7.14-7
MariaDB MariaDB>=5.5.20<5.5.51
MariaDB MariaDB>=10.0.0<10.0.27
MariaDB MariaDB>=10.1.0<10.1.17
Debian Debian Linux=8.0
redhat Openstack=5.0
redhat Openstack=6.0
redhat Openstack=7.0
redhat Openstack=8
redhat Openstack=9
redhat Enterprise Linux=7.0
redhat Enterprise Linux Desktop=6.0
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Server=6.0
redhat Enterprise Linux Server Aus=7.3
redhat Enterprise Linux Server Aus=7.4
redhat Enterprise Linux Server Aus=7.6
redhat Enterprise Linux Server Eus=7.3
redhat Enterprise Linux Server Eus=7.4
redhat Enterprise Linux Server Eus=7.5
redhat Enterprise Linux Server Eus=7.6
redhat Enterprise Linux Server Tus=7.3
redhat Enterprise Linux Server Tus=7.6
redhat Enterprise Linux Workstation=6.0
redhat Enterprise Linux Workstation=7.0
redhat/mysql<5.5.52
5.5.52
redhat/mysql<5.6.33
5.6.33
redhat/mysql<5.7.15
5.7.15
redhat/mariadb<5.5.51
5.5.51
redhat/mariadb<10.0.27
10.0.27
redhat/mariadb<10.1.17
10.1.17
alpine/mariadb>=5.5.20<5.5.51-r0
5.5.51-r0
alpine/mariadb>=10.1.0<10.1.17-r0
10.1.17-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/mysql to a version that resolves this vulnerability.

    Fixed in 5.5.52
  2. Upgrade

    Upgrade redhat/mysql to a version that resolves this vulnerability.

    Fixed in 5.6.33
  3. Upgrade

    Upgrade redhat/mysql to a version that resolves this vulnerability.

    Fixed in 5.7.15
  4. Upgrade

    Upgrade redhat/mariadb to a version that resolves this vulnerability.

    Fixed in 5.5.51
  5. Upgrade

    Upgrade redhat/mariadb to a version that resolves this vulnerability.

    Fixed in 10.0.27
  6. Upgrade

    Upgrade redhat/mariadb to a version that resolves this vulnerability.

    Fixed in 10.1.17
  7. Upgrade

    Upgrade alpine/mariadb to a version that resolves this vulnerability.

    Fixed in 5.5.51-r0
  8. Upgrade

    Upgrade alpine/mariadb to a version that resolves this vulnerability.

    Fixed in 10.1.17-r0
  9. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.5.52
  10. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.6.33
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.7.15
  12. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.5.51
  13. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 10.0.27
  14. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 10.1.17
  15. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.5.51-38.1
  16. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.6.32-78.0
  17. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.7.14-7

Event History

Sep 12, 2016
Data Sourced
via Red Hat·01:16 PM
DescriptionSeverityAffected Software
Sep 20, 2016
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
Description
Data Sourced
06:59 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·06:59 PM
DescriptionSeverityAffected Software
Aug 4, 2021
Event
05:15 PM

Frequently Asked Questions

1

What is the severity of CVE-2016-6662?

CVE-2016-6662 is classified as a medium severity vulnerability that could allow local users to create arbitrary configurations.

2

Which versions of MySQL are affected by CVE-2016-6662?

CVE-2016-6662 affects Oracle MySQL versions 5.5.52 and earlier, 5.6.x versions prior to 5.6.33, and 5.7.x versions prior to 5.7.15.

3

How can I mitigate CVE-2016-6662?

To mitigate CVE-2016-6662, upgrade to the latest version of MySQL or apply the relevant patches provided by Oracle.

4

Are MariaDB versions affected by CVE-2016-6662?

Yes, CVE-2016-6662 impacts MariaDB versions before 5.5.51, 10.0.x before 10.0.27, and 10.1.x before 10.1.17.

5

What impact does CVE-2016-6662 have on Percona Server?

CVE-2016-6662 affects Percona Server versions before 5.5.51-38.1, 5.6.x before 5.6.32-78.0, and 5.7.x before 5.7.14-7.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203