CVE-2025-21522

6.5 MEDIUM

📋 TL;DR

A vulnerability in MySQL Server's parser component allows authenticated attackers with network access to cause denial of service by crashing or hanging the server. This affects MySQL 8.0.40 and earlier, 8.4.3 and earlier, and 9.1.0 and earlier versions. Attackers need only low privileges to exploit this vulnerability.

💻 Affected Systems

Products:
  • Oracle MySQL Server
Versions: 8.0.40 and prior, 8.4.3 and prior, 9.1.0 and prior
Operating Systems: All platforms running affected MySQL versions
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all MySQL deployments with network access enabled and low-privileged user accounts

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Intermittent service outages and performance degradation affecting dependent applications

🟢

If Mitigated

Limited impact with proper network segmentation and privilege restrictions

🌐 Internet-Facing: HIGH - Network accessible vulnerability that can be exploited remotely
🏢 Internal Only: MEDIUM - Requires authenticated access but low privilege accounts are common

🎯 Exploit Status

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

Oracle describes as 'easily exploitable' but requires authenticated access with low privileges

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Apply Critical Patch Update for January 2025 or later

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

Restart Required: Yes

Instructions:

1. Download the appropriate Critical Patch Update from Oracle
2. Apply the patch following Oracle's documentation
3. Restart MySQL service to apply changes

🔧 Temporary Workarounds

Network Access Restriction

all

Restrict network access to MySQL Server to only trusted hosts

# In my.cnf/my.ini: bind-address = 127.0.0.1
# Or use firewall: iptables -A INPUT -p tcp --dport 3306 -s trusted_ip -j ACCEPT

Privilege Reduction

all

Review and minimize low-privileged user accounts and their permissions

REVOKE ALL PRIVILEGES ON *.* FROM 'lowprivuser'@'%';
DROP USER 'unnecessaryuser'@'%';

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate MySQL servers from untrusted networks
  • Regularly monitor for unusual connection patterns or repeated crashes in MySQL logs

🔍 How to Verify

Check if Vulnerable:

Check MySQL version and compare against affected versions: SELECT VERSION();

Check Version:

mysql --version OR SELECT VERSION();

Verify Fix Applied:

Verify version is updated beyond affected ranges and check patch application logs

📡 Detection & Monitoring

Log Indicators:

  • Unexpected MySQL crashes or restarts
  • Multiple connection attempts from single low-privileged accounts
  • Parser-related error messages in MySQL error log

Network Indicators:

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

SIEM Query:

source="mysql_error.log" AND ("crash" OR "shutdown" OR "parser")

🔗 References

📤 Share & Export