CVE-2026-35240·MySQL vulnerability
Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Optimizer). Supported versions that are affected are 8.0.0-8.0.45, 8.4.0-8.4.8 and 9.0.0-9.6.0. Easily exploitable vulnerability allows high privileged attacker with network access via multiple protocols to compromise MySQL Server. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Server. CVSS 3.1 Base Score 4.9 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H).
- Severity
- medium
- Software
- MySQL
- Fixed in
- 8.0.46-0ubuntu0.20.04.1+esm2
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 12% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 9.0.0
Until: 9.6.0
Fixed in: 8.0.46-0ubuntu0.20.04.1+esm2
How to fix this CVE
Update MySQL Server to a patched version that addresses the optimizer-related denial-of-service vulnerability. High-privileged database users can trigger query execution paths that cause server hangs or crashes. Apply version 8.0.46 or later, or upgrade to MySQL 9.0.0+ with the corresponding security patch released by Oracle in April 2026.
sudo dnf update mysql-serverDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed MySQL version with: mysql --version or mysql -u root -p -e 'SELECT VERSION();'
- Step 2: Verify if affected versions (8.0.0-8.0.45, 8.4.0-8.4.8, 9.0.0-9.6.0) are running: SELECT VERSION() FROM mysql.version_info;
- Step 3: Monitor MySQL error logs for repeated 'Server has gone away' or 'Lost connection to MySQL server' entries: tail -f /var/log/mysql/error.log | grep -i 'crash\|hang\|gone away'
- Step 4: Confirm patch installation by verifying version >= 8.0.46 or check package timestamp: dpkg -l | grep mysql-server or rpm -qa | grep mysql-server
FAQ
What is CVE-2026-35240?
CVE-2026-35240 is a denial-of-service vulnerability in the MySQL query optimizer that allows high-privileged users to craft specific SQL queries causing the server to hang or crash. The vulnerability affects multiple MySQL versions and requires network access combined with administrative credentials.
Is CVE-2026-35240 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and has no known public exploits available. However, organizations should still prioritize patching due to the ease of exploitation by authenticated users.
What versions of MySQL are affected by CVE-2026-35240?
MySQL Server versions 8.0.0 through 8.0.45, 8.4.0 through 8.4.8, and 9.0.0 through 9.6.0 are affected. Versions 8.0.46 and later contain the security fix.
How do I check if my server is vulnerable to CVE-2026-35240?
Execute 'mysql -u root -p -e "SELECT VERSION();"' and verify the output matches an affected version range. If the version is 8.0.0-8.0.45, 8.4.0-8.4.8, or 9.0.0-9.6.0, your installation is vulnerable.
Does Defensia detect CVE-2026-35240?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If MySQL is installed on a monitored server, CVE-2026-35240 will appear in your dashboard with remediation steps.
Related MySQL CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-35240. Free for 1 server.
Get started free