SecurityContext

CVE-2016-6662: MySQL & MariaDB - Privilege Escalation

  • Cve: CVE-2016-6662
  • Name: MySQL & MariaDB - Privilege Escalation
  • 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.
  • Impact: Local users can escalate privileges to root by manipulating configuration files, potentially leading to full system compromise.
  • Remediation: Update to the latest patched versions of MySQL, MariaDB, or Percona Server, or apply security patches addressing this issue.
  • Vulnerability type: broken_access_control
  • Vulnerability impact: privilege_escalation
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.6773
  • Epss percentile: 0.99332
  • Assignee: [email protected]
  • Published at: 2016-09-20T18:59:00Z
  • Age in days: 3717
  • Modified at: 2026-06-17T00:51:32Z
  • Patch available: yes
  • Public exploits total: 10
  • References total: 28
  • Products total: 12
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2016-6662
  • Nvd status: modified
  • Checked, none or zero: nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
  • Not known: requirements

Cwe

IdName
CWE-264—

Known exploited entries

ListAdded dateDue dateRansomware use
vulncheck2024-05-14—no

Hackerone

  • Reports: 6
  • Rank: 2507

Public exploits

UrlSourceAdded date
https://www.exploit-db.com/exploits/40360/nvd2016-09-20
https://github.com/kanyaars/CVE-2016-6662.gitvulncheck-xdb2025-08-20
https://github.com/MAYASEVEN/CVE-2016-6662poc-in-github2017-05-01
https://github.com/boompig/cve-2016-6662poc-in-github2017-03-19
https://github.com/boompig/cve-2016-6662.gitvulncheck-xdb2017-03-19

References

Same in every row:

  • Source: nvd
UrlTags
http://www.oracle.com/technetwork/security-advisory/cpuoct2016-2881722.htmlPatch, Vendor Advisory
https://jira.mariadb.org/browse/MDEV-10465Issue Tracking, Vendor Advisory
https://mariadb.com/kb/en/mariadb/mariadb-10027-release-notes/Release Notes, Vendor Advisory
https://mariadb.com/kb/en/mariadb/mariadb-10117-release-notes/Release Notes, Vendor Advisory
https://mariadb.com/kb/en/mariadb/mariadb-5551-release-notes/Release Notes, Vendor Advisory
https://www.exploit-db.com/exploits/40360/Exploit, Third Party Advisory, VDB Entry
http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.htmlThird Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2058.htmlThird Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2059.htmlThird Party Advisory
http://rhn.redhat.com/errata/RHSA-2016-2060.htmlThird Party Advisory

Products

Same in every row:

  • Platform bound: no
  • Sources: nvd
ProductAffectedUrl
oracle:mysql>= 5.7.0, <= 5.7.15; >= 5.6.0, <= 5.6.33; >= 5.5.0, <= 5.5.52/v1/products/oracle/mysql
mariadb:mariadb>= 10.1.0, < 10.1.17; >= 10.0.0, < 10.0.27; >= 5.5.20, < 5.5.51/v1/products/mariadb/mariadb
percona:percona_server>= 5.6, < 5.6.32-78.0; >= 5.5, < 5.5.51-38.1; >= 5.7, < 5.7.14-7/v1/products/percona/percona_server
debian:debian_linux= 8.0/v1/products/debian/debian_linux
redhat:enterprise_linux= 7.0/v1/products/redhat/enterprise_linux
redhat:enterprise_linux_desktop= 7.0, = 6.0/v1/products/redhat/enterprise_linux_desktop
redhat:enterprise_linux_server= 6.0/v1/products/redhat/enterprise_linux_server
redhat:enterprise_linux_workstation= 7.0, = 6.0/v1/products/redhat/enterprise_linux_workstation
redhat:enterprise_linux_server_aus= 7.6, = 7.4, = 7.3/v1/products/redhat/enterprise_linux_server_aus
redhat:enterprise_linux_server_tus= 7.6, = 7.3/v1/products/redhat/enterprise_linux_server_tus

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Known exploited by: vulncheck
  • Vulncheck known exploited since: 2024-05-14
  • Exploitation seen: yes
  • Public exploit: yes
  • Public exploit count: 10
  • Public exploit first date: 2016-09-14
  • Remote: yes
  • Hackerone reports: 6
  • Exposed hosts: 4706702
  • Checked, none or zero: known exploited, initial access, authentication required
  • Not known: known exploited since, nuclei template, initial access since