CVE-2024-21159

4.9 MEDIUM

📋 TL;DR

This vulnerability in MySQL Server's InnoDB component allows high-privileged attackers with network access to cause a denial of service by crashing or hanging the server. It affects MySQL Server versions 8.0.36 and prior, and 8.3.0 and prior. Attackers need administrative database privileges to exploit this vulnerability.

💻 Affected Systems

Products:
  • Oracle MySQL Server
Versions: 8.0.36 and prior, 8.3.0 and prior
Operating Systems: All platforms running affected MySQL versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires InnoDB storage engine to be enabled (default in MySQL 8.0+)

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete unavailability of MySQL Server leading to application downtime and service disruption

🟠

Likely Case

Targeted DoS attacks against critical database servers by malicious insiders or compromised admin accounts

🟢

If Mitigated

Limited impact due to proper access controls and network segmentation

🌐 Internet-Facing: MEDIUM - While network accessible, requires high privileges which are typically not exposed externally
🏢 Internal Only: HIGH - Internal attackers with admin access can easily cause service disruption

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires high-privileged database account (PR:H) but is described as 'easily exploitable'

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: MySQL 8.0.37 and 8.3.1 or later

Vendor Advisory: https://www.oracle.com/security-alerts/cpujul2024.html

Restart Required: Yes

Instructions:

1. Download latest MySQL version from Oracle website. 2. Backup databases. 3. Stop MySQL service. 4. Install updated version. 5. Start MySQL service. 6. Verify version and functionality.

🔧 Temporary Workarounds

Restrict administrative access

all

Limit high-privileged database accounts to trusted users and systems only

REVOKE SUPER, PROCESS, SHUTDOWN ON *.* FROM 'user'@'%';
DROP USER 'unnecessary_admin'@'%';

Network segmentation

linux

Restrict network access to MySQL ports (3306 default) to only required application servers

iptables -A INPUT -p tcp --dport 3306 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 3306 -j DROP

🧯 If You Can't Patch

  • Implement strict access controls: Only grant administrative privileges to absolutely necessary users
  • Monitor for unusual administrative activity and failed connection attempts from unexpected sources

🔍 How to Verify

Check if Vulnerable:

Run 'SELECT VERSION();' in MySQL and check if version is 8.0.36 or earlier, or 8.3.0 or earlier

Check Version:

mysql --version OR SELECT VERSION();

Verify Fix Applied:

After patching, verify version is 8.0.37+ or 8.3.1+ and test database functionality

📡 Detection & Monitoring

Log Indicators:

  • Unexpected server crashes or restarts
  • Multiple failed connection attempts from admin accounts
  • InnoDB error messages in MySQL error log

Network Indicators:

  • Unusual traffic patterns to MySQL port from unexpected sources
  • Multiple rapid connections from single admin account

SIEM Query:

source="mysql_error.log" AND ("crash" OR "hang" OR "InnoDB error")

🔗 References

📤 Share & Export