CVE-2025-50102 Overview
CVE-2025-50102 is a denial-of-service vulnerability in the Oracle MySQL Server Optimizer component. The flaw allows a high-privileged attacker with network access through multiple protocols to crash or hang the MySQL Server. Oracle addressed the issue in the July 2025 Critical Patch Update.
Affected versions span three major release lines: 8.0.0 through 8.0.42, 8.4.0 through 8.4.5, and 9.0.0 through 9.3.0. The vulnerability is categorized under [CWE-400: Uncontrolled Resource Consumption].
Critical Impact
Successful exploitation causes a complete denial of service through a hang or repeatable crash of the MySQL Server process, disrupting database availability for all dependent applications.
Affected Products
- Oracle MySQL Server versions 8.0.0 through 8.0.42
- Oracle MySQL Server versions 8.4.0 through 8.4.5
- Oracle MySQL Server versions 9.0.0 through 9.3.0
Discovery Timeline
- 2025-07-15 - Oracle discloses CVE-2025-50102 in the July 2025 Critical Patch Update
- 2025-07-15 - CVE-2025-50102 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-50102
Vulnerability Analysis
The vulnerability resides in the MySQL Optimizer component, the subsystem responsible for building query execution plans. Specific query patterns trigger uncontrolled resource consumption, resulting in a server hang or crash. Oracle classifies the impact as availability-only, with no confidentiality or integrity impact.
Exploitation requires an authenticated session with high privileges. The attacker interacts with the server over the network using any supported MySQL protocol, including the MySQL client protocol or MySQL X Protocol. The attack is reproducible, meaning the condition can be re-triggered to maintain a sustained denial-of-service state.
EPSS data places the exploitation probability at 0.54% (percentile 43.9), reflecting a low likelihood of in-the-wild weaponization at this time. No public proof-of-concept has been published, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.
Root Cause
The root cause is uncontrolled resource consumption [CWE-400] within the query optimizer. Specific optimizer code paths fail to bound the resources consumed when processing crafted inputs, allowing the server to enter an unrecoverable state. Oracle has not published additional technical detail beyond the Critical Patch Update advisory.
Attack Vector
The attack requires network access to the MySQL Server and a valid high-privileged account such as a user with SUPER, PROCESS, or similarly elevated grants. No user interaction is required. The attacker submits a crafted query or sequence of statements that cause the optimizer to hang or crash the mysqld process.
Because the vulnerability is reachable over multiple protocols, environments exposing the MySQL X Protocol in addition to the classic client port expand the available attack surface. See the Oracle Critical Patch Update July 2025 for authoritative details.
Detection Methods for CVE-2025-50102
Indicators of Compromise
- Unexpected mysqld process crashes, restarts, or hangs with no corresponding administrative action
- Entries in the MySQL error log indicating optimizer-related assertions, signal handling, or stack traces
- Spikes in query execution duration or thread stalls originating from high-privileged accounts
- Repeated connections from a single authenticated source followed by server unresponsiveness
Detection Strategies
- Enable the MySQL general query log or audit log and alert on anomalous queries from accounts with elevated grants such as SUPER or PROCESS
- Monitor mysqld process liveness and automatically correlate crashes with recent query activity from the audit log
- Baseline normal query patterns from administrative accounts and flag deviations consistent with crafted optimizer inputs
Monitoring Recommendations
- Forward MySQL error and audit logs to a centralized analytics platform for correlation with authentication events
- Track SHOW GLOBAL STATUS counters such as Aborted_clients, Threads_running, and Uptime_since_flush_status for anomalies
- Alert on repeated server restarts within short time windows, which can indicate active exploitation attempts
How to Mitigate CVE-2025-50102
Immediate Actions Required
- Apply the Oracle July 2025 Critical Patch Update to all affected MySQL Server instances on versions 8.0.x, 8.4.x, and 9.0.x–9.3.0
- Inventory all MySQL deployments, including embedded or appliance-bundled instances, and prioritize internet-exposed servers
- Audit accounts holding high privileges and revoke unnecessary SUPER, PROCESS, and administrative grants
- Enable crash recovery monitoring so unexpected mysqld restarts generate security tickets
Patch Information
Oracle released fixes for CVE-2025-50102 in the July 2025 Critical Patch Update. Upgrade to the first fixed release in each supported line: 8.0.43 or later for the 8.0 series, 8.4.6 or later for the 8.4 LTS series, and the post-9.3.0 innovation release. See the Oracle Critical Patch Update July 2025 Advisory for the complete patch matrix.
Workarounds
- Restrict network access to MySQL Server to trusted application subnets using firewall or security group rules
- Disable the MySQL X Protocol listener if it is not required by applications
- Apply the principle of least privilege by removing elevated grants from accounts that do not require them
- Enforce TLS and strong authentication for all administrative connections to limit the pool of accounts capable of exploitation
# Configuration example: restrict high-privilege account access and disable X Protocol
# 1. Review accounts with high privileges that could exploit CVE-2025-50102
mysql -u root -p -e "SELECT user, host FROM mysql.user WHERE Super_priv='Y' OR Process_priv='Y';"
# 2. Revoke unnecessary privileges
mysql -u root -p -e "REVOKE SUPER, PROCESS ON *.* FROM 'app_user'@'%';"
# 3. Disable X Protocol in my.cnf if not required
# [mysqld]
# mysqlx=OFF
# 4. Verify installed version is patched
mysql -u root -p -e "SELECT VERSION();"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

