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
| # | CVE | CVSS | Published | Type | CISA KEV |
|---|---|---|---|---|---|
| 1 | CVE-2020-11656 | 9.8 Critical | 2020-04-09 | Use after free | No |
| 2 | CVE-2019-14540 | 9.8 Critical | 2019-09-15 | Insecure deserialization | No |
| 3 | CVE-2016-9841 | 9.8 Critical | 2017-05-23 | Critical security flaw | No |
| 4 | CVE-2016-9843 | 9.8 Critical | 2017-05-23 | Critical security flaw | No |
| 5 | CVE-2016-6662 | 9.8 Critical | 2016-09-20 | Permissions and privileges | No |
| 6 | CVE-2016-0639 | 9.8 Critical | 2016-04-21 | Critical security flaw | No |
| 7 | CVE-2016-0705 | 9.8 Critical | 2016-03-03 | Denial of service | No |
| 8 | CVE-2016-9840 | 8.8 High | 2017-05-23 | Security flaw | No |
| 9 | CVE-2016-9842 | 8.8 High | 2017-05-23 | Security flaw | No |
| 10 | CVE-2016-3477 | 8.1 High | 2016-07-21 | Security flaw | No |
Each MySQL CVE explained
1. CVE-2020-11656: Use after free
- 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).
2. CVE-2019-14540: Insecure deserialization
- 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).
3. CVE-2016-9841: Critical security flaw
- 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.
4. CVE-2016-9843: Critical security flaw
- 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.
5. CVE-2016-6662: Permissions and privileges
- 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).
6. CVE-2016-0639: Critical security flaw
- 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).
7. CVE-2016-0705: Denial of service
- 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).
8. CVE-2016-9840: Security flaw
- 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).
9. CVE-2016-9842: Security flaw
- 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).
10. CVE-2016-3477: Security flaw
- 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).
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.
| Release | Released | End of life | Latest | Status |
|---|---|---|---|---|
| MySQL 26.10 | Oct 20, 2026 | Not announced | 26.10.0 | Supported |
| MySQL 26.7 | Jul 28, 2026 | Oct 20, 2026 | 26.7.1 | End of life |
| MySQL 9.7 (LTS) | Apr 21, 2026 | Apr 30, 2034 | 9.7.4 | Supported |
| MySQL 9.6 | Jan 20, 2026 | Apr 21, 2026 | 9.6.1 | End of life |
| MySQL 9.5 | Oct 21, 2025 | Jan 20, 2026 | 9.5.2 | End of life |
| MySQL 9.4 | Jul 22, 2025 | Oct 21, 2025 | 9.4.2 | End of life |
| MySQL 9.3 | Apr 15, 2025 | Jul 22, 2025 | 9.3.2 | End of life |
| MySQL 9.2 | Jan 21, 2025 | Apr 15, 2025 | 9.2.2 | End 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
- Never expose the database port to the internet; allow only the application servers.
- Use strong, unique credentials and least-privilege accounts for each application.
- Apply minor and security releases on a regular cadence, after testing.
- Encrypt connections with TLS and encrypt backups.
- Restrict or remove admin tools you do not need.
- 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.
Related security guides
Few stacks run MySQL alone. These guides cover the technologies it is most often deployed with.
- MariaDB vulnerabilities: MariaDB is a community-developed fork of MySQL.
- PHP vulnerabilities: PHP is the server-side language behind WordPress and most of the web.
- WordPress vulnerabilities: WordPress is the world's most used content management system.
- phpMyAdmin vulnerabilities: phpMyAdmin is a web interface for managing MySQL and MariaDB databases.
- Oracle Database vulnerabilities: Oracle Database is a leading enterprise relational database.
- PostgreSQL vulnerabilities: PostgreSQL is a powerful open-source object-relational database.
- SQLite vulnerabilities: SQLite is an embedded SQL database engine found in countless applications.
- Drupal vulnerabilities: Drupal is an open-source content management system and framework.
- Laravel vulnerabilities: Laravel is the most popular PHP web application framework.
- Magento vulnerabilities: Magento (Adobe Commerce) is an enterprise e-commerce platform.
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
- National Vulnerability Database (NVD) (opens in a new tab), CVE records, CVSS scores and CPE counts, checked Nov 3, 2026.
- CISA Known Exploited Vulnerabilities (KEV) catalog (opens in a new tab), checked Nov 3, 2026.
- endoflife.date: MySQL (opens in a new tab), release and support dates, checked Nov 3, 2026.
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.