VulnarioBlogMySQL vulnerabilities

MySQL Vulnerabilities: The 10 Most Critical MySQL Security Bugs (CVEs)

MySQL vulnerabilities are security flaws in MySQL that attackers can abuse to steal data, take over a server or interrupt a service. MySQL is the world's most widely used open-source relational database. The National Vulnerability Database (NVD) lists 1,337 CVEs for MySQL, 7 of them rated critical, and 4 were published in the last 12 months. None of them is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog for the product entries we checked.

This guide lists the 10 most critical MySQL security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers MySQL security basics, the current end-of-life dates and a free way to be told about the next MySQL CVE as soon as it is published.

Key takeaways

  • No MySQL CVE is currently in CISA's KEV catalog for the entries we checked, but critical flaws still get exploited quickly once details are public.
  • 7 MySQL CVEs are rated critical (CVSS v3), and 4 new ones were published in the last 12 months.
  • The newest CVE in this guide is CVE-2020-11656, published Apr 9, 2020.
  • Supported MySQL releases today (per endoflife.date): 26.10, 9.7. Releases not on the list are past their announced end of life.
  • You can monitor MySQL for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.

How we ranked these MySQL CVEs

We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.

Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.

The 10 most critical MySQL CVEs at a glance

Most critical MySQL vulnerabilities (data from NVD and CISA KEV)
#CVECVSSPublishedTypeCISA KEV
1CVE-2020-116569.8 Critical2020-04-09Use after freeNo
2CVE-2019-145409.8 Critical2019-09-15Insecure deserializationNo
3CVE-2016-98419.8 Critical2017-05-23Critical security flawNo
4CVE-2016-98439.8 Critical2017-05-23Critical security flawNo
5CVE-2016-66629.8 Critical2016-09-20Permissions and privilegesNo
6CVE-2016-06399.8 Critical2016-04-21Critical security flawNo
7CVE-2016-07059.8 Critical2016-03-03Denial of serviceNo
8CVE-2016-98408.8 High2017-05-23Security flawNo
9CVE-2016-98428.8 High2017-05-23Security flawNo
10CVE-2016-34778.1 High2016-07-21Security flawNo

Each MySQL CVE explained

1. CVE-2020-11656: Use after free

  • CVSS 9.8 Critical
  • Published 2020-04-09
  • CWE-416
What NVD says
In SQLite through 3.31.1, the ALTER TABLE implementation has a use-after-free, as demonstrated by an ORDER BY clause that belongs to a compound SELECT statement.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
8.0.0 through 8.0.22
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2020-11656 (opens in a new tab)

2. CVE-2019-14540: Insecure deserialization

  • CVSS 9.8 Critical
  • Published 2019-09-15
  • CWE-502
What NVD says
A Polymorphic Typing issue was discovered in FasterXML jackson-databind before 2.9.10. It is related to com.zaxxer.hikari.HikariConfig.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.7.0 through 5.7.30; 8.0.0 through 8.0.20
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2019-14540 (opens in a new tab)

3. CVE-2016-9841: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2017-05-23
What NVD says
inffast.c in zlib 1.2.8 might allow context-dependent attackers to have unspecified impact by leveraging improper pointer arithmetic.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.5.0 through 5.5.61; 5.6.0 through 5.6.41; 5.7.0 through 5.7.23; 8.0.0 through 8.0.12
What to do
Apply the vendor's security update for your release and restart the service.

NVD record for CVE-2016-9841 (opens in a new tab)

4. CVE-2016-9843: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2017-05-23
What NVD says
The crc32_big function in crc32.c in zlib 1.2.8 might allow context-dependent attackers to have unspecified impact via vectors involving big-endian CRC calculation.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.5.0 through 5.5.61; 5.6.0 through 5.6.41; 5.7.0 through 5.7.23; 8.0.0 through 8.0.12
What to do
Apply the vendor's security update for your release and restart the service.

NVD record for CVE-2016-9843 (opens in a new tab)

5. CVE-2016-6662: Permissions and privileges

  • CVSS 9.8 Critical
  • Published 2016-09-20
  • CWE-264
What NVD says
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.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.5.0 through 5.5.52; 5.6.0 through 5.6.33; 5.7.0 through 5.7.15
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2016-6662 (opens in a new tab)

6. CVE-2016-0639: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2016-04-21
What NVD says
Unspecified vulnerability in Oracle MySQL 5.6.29 and earlier and 5.7.11 and earlier allows remote attackers to affect confidentiality, integrity, and availability via vectors related to Pluggable Authentication.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.6.0 through 5.6.29; 5.7.0 through 5.7.11
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2016-0639 (opens in a new tab)

7. CVE-2016-0705: Denial of service

  • CVSS 9.8 Critical
  • Published 2016-03-03
What NVD says
Double free vulnerability in the dsa_priv_decode function in crypto/dsa/dsa_ameth.c in OpenSSL 1.0.1 before 1.0.1s and 1.0.2 before 1.0.2g allows remote attackers to cause a denial of service (memory corruption) or possibly have unspecified other impact via a malformed DSA private key.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.6.0 through 5.6.29; 5.7.0 through 5.7.11
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2016-0705 (opens in a new tab)

8. CVE-2016-9840: Security flaw

  • CVSS 8.8 High
  • Published 2017-05-23
What NVD says
inftrees.c in zlib 1.2.8 might allow context-dependent attackers to have unspecified impact by leveraging improper pointer arithmetic.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.5.0 through 5.5.61; 5.6.0 through 5.6.41; 5.7.0 through 5.7.23; 8.0.0 through 8.0.12
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2016-9840 (opens in a new tab)

9. CVE-2016-9842: Security flaw

  • CVSS 8.8 High
  • Published 2017-05-23
  • CWE-1335
What NVD says
The inflateMark function in inflate.c in zlib 1.2.8 might allow context-dependent attackers to have unspecified impact via vectors involving left shifts of negative integers.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.5.0 through 5.5.61; 5.6.0 through 5.6.41; 5.7.0 through 5.7.23; 8.0.0 through 8.0.12
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2016-9842 (opens in a new tab)

10. CVE-2016-3477: Security flaw

  • CVSS 8.1 High
  • Published 2016-07-21
What NVD says
Unspecified vulnerability in Oracle MySQL 5.5.49 and earlier, 5.6.30 and earlier, and 5.7.12 and earlier and MariaDB before 5.5.50, 10.0.x before 10.0.26, and 10.1.x before 10.1.15 allows local users to affect confidentiality, integrity, and availability via vectors related to Server: Parser.
How it can be attacked
Can be exploited locally on the machine with high attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
5.5.0 through 5.5.49; 5.6.0 through 5.6.30; 5.7.0 through 5.7.12
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2016-3477 (opens in a new tab)

MySQL end of life: which versions still get security fixes

Running a release that still receives security fixes is the most effective way to avoid MySQL vulnerabilities. After a release reaches end of life, newly published CVEs stay unpatched. As of Nov 3, 2026 the supported MySQL releases are 26.10, 9.7.

MySQL release support (source: endoflife.date, checked Nov 3, 2026)
ReleaseReleasedEnd of lifeLatestStatus
MySQL 26.10Oct 20, 2026Not announced26.10.0Supported
MySQL 26.7Jul 28, 2026Oct 20, 202626.7.1End of life
MySQL 9.7 (LTS)Apr 21, 2026Apr 30, 20349.7.4Supported
MySQL 9.6Jan 20, 2026Apr 21, 20269.6.1End of life
MySQL 9.5Oct 21, 2025Jan 20, 20269.5.2End of life
MySQL 9.4Jul 22, 2025Oct 21, 20259.4.2End of life
MySQL 9.3Apr 15, 2025Jul 22, 20259.3.2End of life
MySQL 9.2Jan 21, 2025Apr 15, 20259.2.2End of life

Dates come from endoflife.date (opens in a new tab), which tracks each project's own support policy. Confirm them with the vendor before planning an upgrade.

How to check if your MySQL is vulnerable

Find the exact version first, then compare it with the affected and fixed versions in each CVE above.

mysql --version

On Linux, Debian, Ubuntu and RHEL-based distributions often backport security fixes and keep the old version number, so a package that looks old can already be patched. Check your distribution's own security tracker or the package changelog before concluding that a server is exposed.

MySQL security checklist

  1. Never expose the database port to the internet; allow only the application servers.
  2. Use strong, unique credentials and least-privilege accounts for each application.
  3. Apply minor and security releases on a regular cadence, after testing.
  4. Encrypt connections with TLS and encrypt backups.
  5. Restrict or remove admin tools you do not need.
  6. Test restoring from backup, not only creating backups.

Where you run MySQL matters as much as how you patch it. Whether your site lives on a VPS, a dedicated server or shared hosting (opens in a new tab), check who is responsible for updating MySQL: on most plans the operating system and applications are yours to patch unless the plan says otherwise.

Your stack is bigger than MySQL. A flaw anywhere in the chain can be the way in, so also review our guides to MariaDB vulnerabilities, PHP vulnerabilities and WordPress vulnerabilities.

How to get alerted about new MySQL vulnerabilities

NVD received 4 new MySQL CVEs in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:

  • Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
  • Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
  • Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.

Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose MySQL and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.

  • Free: all technologies, alerts grouped at most every 12 hours.
  • Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.

Few stacks run MySQL alone. These guides cover the technologies it is most often deployed with.

Frequently asked questions about MySQL vulnerabilities

What are the most critical MySQL vulnerabilities?

Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical MySQL CVEs include CVE-2020-11656 (CVSS 9.8), CVE-2019-14540 (CVSS 9.8), CVE-2016-9841 (CVSS 9.8). The guide above ranks the 10 most critical with affected versions and fixes.

Have MySQL vulnerabilities been exploited in real attacks?

For the MySQL product entries we checked, none of the CVEs is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. A CVE can still be exploited before it is added, so keep MySQL patched.

How many vulnerabilities does MySQL have?

As of Nov 3, 2026 the National Vulnerability Database lists 1,337 CVEs for MySQL, with 7 rated critical by CVSS v3. 4 were published in the previous twelve months.

Which MySQL versions are still supported?

As of Nov 3, 2026, endoflife.date lists these MySQL releases as supported: 26.10, 9.7. Releases that are not listed are past their announced end of life.

How do I check which MySQL version I run?

Run mysql --version on the server and compare the result with the fixed versions in each CVE. On Debian, Ubuntu and RHEL-based systems, fixes are often backported without changing the version number, so also check your distribution's security tracker.

How can I get alerted when a new MySQL CVE is published?

Add MySQL to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose MySQL and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.

Is MySQL secure?

MySQL is as secure as its patch level. NVD published 4 new MySQL CVEs in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.

What is CVE-2020-11656?

CVE-2020-11656 is a critical MySQL vulnerability with a CVSS score of 9.8, published Apr 9, 2020. In SQLite through 3.31.1, the ALTER TABLE implementation has a use-after-free, as demonstrated by an ORDER BY clause that belongs to a compound SELECT statement.

Sources

This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.