CVE-2016-6662: Critical severity Oracle MySQL vulnerability
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
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/mysqlto a version that resolves this vulnerability.Fixed in 5.5.52 - Upgrade
Upgrade
redhat/mysqlto a version that resolves this vulnerability.Fixed in 5.6.33 - Upgrade
Upgrade
redhat/mysqlto a version that resolves this vulnerability.Fixed in 5.7.15 - Upgrade
Upgrade
redhat/mariadbto a version that resolves this vulnerability.Fixed in 5.5.51 - Upgrade
Upgrade
redhat/mariadbto a version that resolves this vulnerability.Fixed in 10.0.27 - Upgrade
Upgrade
redhat/mariadbto a version that resolves this vulnerability.Fixed in 10.1.17 - Upgrade
Upgrade
alpine/mariadbto a version that resolves this vulnerability.Fixed in 5.5.51-r0 - Upgrade
Upgrade
alpine/mariadbto a version that resolves this vulnerability.Fixed in 10.1.17-r0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.5.52 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.6.33 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.7.15 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.5.51 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.27 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.1.17 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.5.51-38.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.6.32-78.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.7.14-7
Event History
Frequently Asked Questions
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.
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.
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.
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.
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.