← Vulnerability feed

Vulnerability record · CVE-2016-6662 · published 20 September 2016

CVE-2016-6662: MySQL, MariaDB and Percona Server local privilege escalation via general_log_file

Oracle · Mysql

MySQL, MariaDB and Percona Server allow a local user to set general_log_file to a my.cnf configuration path, creating arbitrary configuration files and bypassing protection mechanisms. The flaw can be leveraged to execute arbitrary code with root privileges by setting malloc_lib, making it a serious local privilege escalation on database hosts.

9.8 CVSS 3.0 Critical EPSS 68% · top 0.7% CWE-264 · Permissions and access controls
9.8CVSS 3.0 base score, v2 10.0
68%EPSS exploitation probability, 30 days
NoNot in CISA KEV
12Affected product versions listed by NVD
54References, 2 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

critical priorityCVSS 9.8 with a documented path to root code execution and a very high EPSS score, though exploitation requires local access.

What it is

MySQL, MariaDB and Percona Server allow a local user to set general_log_file to a my.cnf configuration path, creating arbitrary configuration files and bypassing protection mechanisms. The flaw can be leveraged to execute arbitrary code with root privileges by setting malloc_lib, making it a serious local privilege escalation on database hosts.

Impact

An attacker with local access gains the ability to write arbitrary configuration and, per the advisory, execute code as root. This effectively yields full control of the database host.

Attack surface

The flaw is reached locally by a user able to influence the general_log_file setting; the CVSS vector is network-based with no privileges or user interaction, but the description and advisory frame it as a local-user issue. No authentication or user interaction is required per the vector.

Exploitation

Not listed in CISA KEV and no ransomware associations are documented; EPSS is high at 0.6773 (99.28th percentile), and references include a third-party advisory describing remote root code execution and privilege escalation.

What to do

  • Apply vendor patches: Oracle October 2016 CPU, MariaDB 5.5.51/10.0.27/10.1.17, Percona 5.5.51-38.1/5.6.32-78.0/5.7.14-7, and relevant Red Hat, Debian and Gentoo errata.
  • Restrict local shell and database account access on database hosts to trusted administrators only.
  • Ensure my.cnf and configuration directories are owned by root and not writable by the mysql user or other local users.
  • Audit and remove unnecessary FILE and SUPER privileges from non-administrative database accounts.
  • Monitor for unexpected changes to my.cnf and other MySQL/MariaDB configuration files.

Detection

  • Alert on modifications to my.cnf or other MySQL/MariaDB configuration files outside change windows.
  • Monitor for general_log_file being set to paths outside expected log directories.
  • Watch for unexpected child processes or library loads (malloc_lib) spawned by the database service.
  • Review database audit logs for local accounts altering logging or configuration variables.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

12 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2058.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2059.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2060.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2061.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2062.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2077.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2130.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2131.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2595.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2749.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2927.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2928.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2017-0184.html Third Party Advisory
http://seclists.org/fulldisclosure/2016/Sep/23 Mailing ListThird Party Advisory
http://www.debian.org/security/2016/dsa-3666 Third Party Advisory
http://www.openwall.com/lists/oss-security/2016/09/12/3 Mailing ListThird Party Advisory
http://www.oracle.com/technetwork/security-advisory/cpuoct2016-2881722.html PatchVendor Advisory
http://www.securityfocus.com/bid/92912 Third Party AdvisoryVDB Entry
http://www.securitytracker.com/id/1036769 Third Party AdvisoryVDB Entry
https://jira.mariadb.org/browse/MDEV-10465 Issue TrackingVendor Advisory
https://mariadb.com/kb/en/mariadb/mariadb-10027-release-notes/ Release NotesVendor Advisory
https://mariadb.com/kb/en/mariadb/mariadb-10117-release-notes/ Release NotesVendor Advisory
https://mariadb.com/kb/en/mariadb/mariadb-5551-release-notes/ Release NotesVendor Advisory
https://security.gentoo.org/glsa/201701-01 Third Party Advisory
https://www.exploit-db.com/exploits/40360/ ExploitThird Party AdvisoryVDB Entry
https://www.percona.com/blog/2016/09/12/percona-server-critical-update-cve-2016-6662/ Third Party Advisory
http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2058.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2059.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2060.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2061.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2062.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2077.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2130.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2131.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2595.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2749.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2927.html Third Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2928.html Third Party Advisory

Track CVE-2016-6662 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2023-46604Apache ActiveMQ OpenWire deserialization remote code executionThe Java OpenWire protocol marshaller in Apache ActiveMQ deserializes untrusted data, letting an attacker manipulate serialized class types so the br…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2016-6662), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.