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.
CVE-2016-6662
Score 9.8 from GitHub Security Advisory (severity: CRITICAL) published 2022-05-13. NVD baseline CVSS 9.8; sources differ by 0.0.
- High exploitation likelihood — EPSS 68%
A fix is available — apply it.
- CVSS v3
- 9.8
- EG Score
- 9.8(medium)
- EG Risk
- 76(Track*)EG Risk 76/100SSVC: Track*
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity98% × 45%Exploitation68% × 40%Automatability30% × 15%Action: Watch closely — could escalate to Attend. - EPSS PROB
- 68%
- EPSS %ILE
- 99%
- KEV
- Not listed
Published
September 20, 2016
Last Modified
June 17, 2026
Advisory Details (10)
Auto-updated Sep 16, 2026MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662
http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.htmlPatch Availability(11)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | mysql-testsuite-5.7 (5.7.15-0ubuntu0.16.04.1) @ xenial | 2026-05-20 | ubuntu |
| redhat | mysql-0:5.1.73-8.el6_8 | 2017-01-24 | redhat |
| redhat | rh-mariadb101-mariadb-1:10.1.19-6.el7 | 2016-12-08 | redhat |
| redhat | rh-mariadb100-mariadb-1:10.0.28-5.el7 | 2016-12-08 | redhat |
| redhat | rh-mysql56-mysql-0:5.6.34-2.el7 | 2016-11-15 | redhat |
| redhat | mariadb-1:5.5.52-1.el7 | 2016-11-03 | redhat |
| redhat | mariadb55-mariadb-0:5.5.53-1.el7 | 2016-10-31 | redhat |
| redhat | mysql55-mysql-0:5.5.52-1.el7 | 2016-10-31 | redhat |
| redhat | mariadb-galera-1:5.5.42-5.el7ost | 2016-10-18 | redhat |
| redhat | mariadb-galera-1:5.5.42-1.2.el7ost | 2016-10-13 | redhat |
| redhat | mariadb-galera-0:5.5.42-1.1.el6ost | 2016-10-13 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(4 across 4 ecosystems)
Alpine:v3.2(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| mariadb | — | 5.5.51-r0 | — |
Alpine:v3.3(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| mariadb | — | 10.1.17-r0 | — |
Debian:7(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| mysql-5.5 | 5.5.30+dfsg-1.1 ... 5.5.50-0+deb7u2 (23 versions) | 5.5.52-0+deb7u1 | — |
Debian:8(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| mysql-5.5 | 5.5.42-1 ... 5.5.50-0+deb8u1 (7 versions) | 5.5.52-0+deb8u1 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
All Vendor Advisories
(14)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
- Red HatRHSA-2016:2058IMPORTANT2016-09-12
RHSA-2016:2058 — Important
- Red HatRHSA-2016:2059IMPORTANT2016-09-12
RHSA-2016:2059 — Important
- Red HatRHSA-2016:2060IMPORTANT2016-09-12
RHSA-2016:2060 — Important
- Red HatRHSA-2016:2061IMPORTANT2016-09-12
RHSA-2016:2061 — Important
- Red HatRHSA-2016:2062IMPORTANT2016-09-12
RHSA-2016:2062 — Important
- Red HatRHSA-2016:2077IMPORTANT2016-09-12
RHSA-2016:2077 — Important
- Red HatRHSA-2016:2130IMPORTANT2016-09-12
RHSA-2016:2130 — Important
- Red HatRHSA-2016:2131IMPORTANT2016-09-12
RHSA-2016:2131 — Important
- Red HatRHSA-2016:2595IMPORTANT2016-09-12
RHSA-2016:2595 — Important
- Red HatRHSA-2016:2749IMPORTANT2016-09-12
RHSA-2016:2749 — Important
- Red HatRHSA-2016:2927IMPORTANT2016-09-12
RHSA-2016:2927 — Important
- Red HatRHSA-2016:2928IMPORTANT2016-09-12
RHSA-2016:2928 — Important
- Red HatRHSA-2017:0184IMPORTANT2016-09-12
RHSA-2017:0184 — Important
- UbuntuUSN-3078-1MEDIUM
MySQL vulnerability
Data Freshness Timeline
(refreshed 6× in last 7d / 19× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 108 total refreshes for this CVE.
- 2026-09-19 15:35 UTCEPSS rescore
- 2026-09-18 19:22 UTCEPSS rescore
- 2026-09-17 19:22 UTCEPSS rescore
- 2026-09-16 05:05 UTCEPSS rescore
- 2026-09-15 03:05 UTCEPSS rescore
- 2026-09-15 00:14 UTCOSV refresh
- 2026-09-13 16:41 UTCEPSS rescore
- 2026-09-12 14:55 UTCEPSS rescore
- 2026-09-11 14:46 UTCEPSS rescore
- 2026-09-10 09:26 UTCEPSS rescore
- 2026-09-07 15:56 UTCEPSS rescore
- 2026-09-04 13:56 UTCEPSS rescore
- 2026-09-02 14:07 UTCEPSS rescore
- 2026-09-01 13:48 UTCEPSS rescore
- 2026-08-28 21:35 UTCEPSS rescore
- 2026-08-27 14:20 UTCEPSS rescore
- 2026-08-26 23:39 UTCOSV refresh
- 2026-08-26 14:41 UTCEPSS rescore
- 2026-08-21 23:44 UTCEPSS rescore
- 2026-08-19 16:59 UTCEPSS rescore
- 2026-08-17 13:42 UTCEPSS rescore
- 2026-08-16 02:10 UTCEPSS rescore
- 2026-08-15 01:25 UTCEPSS rescore
- 2026-08-12 13:46 UTCEPSS rescore
- 2026-08-11 13:36 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-08-10 13:40 UTCOSV refresh
- 2026-08-09 13:42 UTCEPSS rescore
- 2026-08-07 16:22 UTCEPSS rescore
- 2026-08-05 19:12 UTCEPSS rescore
- 2026-08-01 04:11 UTCEPSS rescore
- 2026-07-30 16:24 UTCEPSS rescore
- 2026-07-30 01:26 UTCEPSS rescore
- 2026-07-30 01:26 UTCEPSS rescore
- 2026-07-28 15:31 UTCEPSS rescore
- 2026-07-26 14:50 UTCEPSS rescore
- 2026-07-25 14:11 UTCOSV refresh
- 2026-07-24 14:13 UTCEPSS rescore
- 2026-07-23 01:23 UTCEG score recompute
- 2026-07-22 22:03 UTCEG score recompute
- 2026-07-22 14:04 UTCEPSS rescore
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-15 16:54 UTCEPSS rescore
- 2026-07-15 16:54 UTCEPSS rescore
- 2026-07-13 22:26 UTCEPSS rescore
- 2026-07-13 06:09 UTCEPSS rescore
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-08 08:35 UTCOSV refresh
- 2026-07-05 02:27 UTCEPSS rescore
- 2026-07-01 15:02 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-27 03:05 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-19 20:23 UTCOSV refresh
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-15 17:45 UTCEPSS rescore
- 2026-06-14 23:14 UTCEPSS rescore
- 2026-06-14 23:14 UTCEPSS rescore
- 2026-06-13 22:57 UTCEPSS rescore
- 2026-06-13 22:57 UTCEPSS rescore
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-02 20:10 UTCEPSS rescore
- 2026-06-01 13:49 UTCEPSS rescore
- 2026-06-01 13:49 UTCEPSS rescore
- 2026-05-31 22:28 UTCEPSS rescore
- 2026-05-31 22:28 UTCEPSS rescore
- 2026-05-31 00:43 UTCOSV refresh
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-20 09:44 UTCVendor advisory
- 2026-05-20 09:44 UTCGHSA enrichment
- 2026-05-20 05:37 UTCVendor advisory
- 2026-05-20 05:37 UTCGHSA enrichment
- 2026-05-20 01:30 UTCVendor advisory
- 2026-05-20 01:30 UTCGHSA enrichment
- 2026-05-19 21:23 UTCVendor advisory
- 2026-05-19 21:23 UTCGHSA enrichment
- 2026-05-19 17:14 UTCVendor advisory
- 2026-05-19 17:14 UTCGHSA enrichment
- 2026-05-19 13:07 UTCVendor advisory
- 2026-05-19 13:07 UTCGHSA enrichment
- 2026-05-19 09:00 UTCVendor advisory
- 2026-05-19 09:00 UTCGHSA enrichment
Publicly available exploits
(3 references)Working exploit code is in the public domain (2 GitHub PoCs) (1 Exploit-DB entry). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoCMAYASEVEN/CVE-2016-6662First seen May 1, 2017
From SQL injection to root shell with CVE-2016-6662 by MaYaSeVeN
Open source ↗ - GitHub PoCAshrafdev/MySQL-Remote-Root-Code-ExecutionFirst seen Sep 20, 2016
0ldSQL_MySQL_RCE_exploit.py (ver. 1.0) (CVE-2016-6662) MySQL Remote Root Code Execution / Privesc PoC Exploit For testing purposes only. Do no harm.
Open source ↗ - Exploit-DBEDB-40360First seen Sep 12, 2016
MySQL / MariaDB / PerconaDB 5.5.51/5.6.32/5.7.14 - Code Execution / Privilege Escalation
Open source ↗
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat:RHSA-2016:2130 · redhat:RHSA-2016:2927
Same CWE
10 shownCWE-264
- CVE-2025-5321EG 9.9CRITICAL
- CVE-2022-36246EG 9.8CRITICAL
- CVE-2022-41781NVD 6.5EG 9.8CRITICAL
- CVE-2022-37344NVD 7.6EG 9.8CRITICAL
- CVE-2022-36427NVD 7.3EG 9.8CRITICAL
- CVE-2022-36387NVD 7.6EG 9.8CRITICAL
- CVE-2022-36425NVD 5.4EG 9.8CRITICAL
- CVE-2022-34149EG 9.8CRITICAL
- CVE-2022-34487EG 9.8CRITICAL
- CVE-2022-33198EG 9.8CRITICAL
Frequently asked(5)
What is CVE-2016-6662?
When was CVE-2016-6662 disclosed?
Is CVE-2016-6662 actively exploited?
What is the CVSS score of CVE-2016-6662?
How do I remediate CVE-2016-6662?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2016-6662
Is Your Infrastructure Affected by CVE-2016-6662?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.