CVE-2024-21218

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 (DoS) by crashing or hanging the server. It affects MySQL versions 8.0.39 and prior, 8.4.2 and prior, and 9.0.1 and prior. Attackers need administrative database privileges but can exploit it remotely via multiple protocols.

💻 Affected Systems

Products:
  • Oracle MySQL Server
Versions: 8.0.39 and prior, 8.4.2 and prior, 9.0.1 and prior
Operating Systems: All operating systems running affected MySQL versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with InnoDB storage engine enabled (default). Requires attacker to have high database privileges (CREATE, ALTER, DROP, etc.).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete unavailability of MySQL Server leading to application downtime, data unavailability, and business disruption.

🟠

Likely Case

Targeted DoS attacks against critical MySQL instances by malicious insiders or compromised admin accounts, causing service interruptions.

🟢

If Mitigated

Limited impact due to proper access controls, monitoring, and redundancy preventing successful exploitation.

🌐 Internet-Facing: MEDIUM - While exploitable remotely, attackers need high privileges which are rarely exposed directly to the internet.
🏢 Internal Only: HIGH - Internal attackers with admin access or compromised admin accounts can easily exploit this to disrupt critical database services.

🎯 Exploit Status

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

Oracle describes it as 'easily exploitable' but requires high privileges. No public exploit details available as of advisory publication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 8.0.40, 8.4.3, 9.0.2 or later

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

Restart Required: Yes

Instructions:

1. Download the patched MySQL version from Oracle. 2. Backup databases and configuration. 3. Stop MySQL service. 4. Install the update. 5. Restart MySQL service. 6. Verify version and functionality.

🔧 Temporary Workarounds

Restrict Administrative Access

all

Limit high-privilege database accounts to only necessary users and systems. Implement network segmentation to restrict access to MySQL administrative interfaces.

REVOKE ALL PRIVILEGES ON *.* FROM 'admin_user'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE ON specific_db.* TO 'app_user'@'specific_host';

Network Access Controls

linux

Restrict network access to MySQL ports (default 3306) using firewalls to only trusted hosts and applications.

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 principle of least privilege for database accounts, regularly audit and remove unnecessary admin privileges.
  • Deploy database monitoring and alerting for unusual administrative activity or connection patterns that could indicate exploitation attempts.

🔍 How to Verify

Check if Vulnerable:

Check MySQL version: SELECT VERSION(); If version is 8.0.0-8.0.39, 8.4.0-8.4.2, or 9.0.0-9.0.1, system is vulnerable.

Check Version:

mysql -u root -p -e 'SELECT VERSION();'

Verify Fix Applied:

After patching, run SELECT VERSION(); and confirm version is 8.0.40+, 8.4.3+, or 9.0.2+. Test database functionality and monitor for crashes.

📡 Detection & Monitoring

Log Indicators:

  • Multiple connection attempts from unusual sources with admin privileges
  • MySQL error logs showing unexpected crashes or hangs
  • Authentication logs showing admin account misuse

Network Indicators:

  • Unusual traffic patterns to MySQL port 3306 from unauthorized sources
  • Multiple rapid connections followed by service disruption

SIEM Query:

source="mysql_error.log" AND ("crash" OR "hang" OR "shutdown unexpectedly") OR source="mysql_auth.log" AND user IN (admin_users) AND result="success" FROM unusual_ip

🔗 References

📤 Share & Export