A new vulnerability, identified as CVE-2023-21945, has been discovered in the MySQL Server product of Oracle MySQL. The affected component is the Server: Optimizer, and the supported versions impacted by this vulnerability are 8..32 and prior. This vulnerability allows a high privileged attacker to compromise MySQL Server with network access via multiple protocols. Attacks leveraging this vulnerability can lead to unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of the MySQL Server, posing a serious threat to its availability. The CVSS 3.1 Base Score for this vulnerability is 4.9, with availability impacts being the primary concern. The CVSS Vector is (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H).

Exploit Details

This vulnerability exists in the MySQL Server's Optimizer component, which is responsible for the analysis and optimization of SQL queries. Attackers can exploit this vulnerability by crafting a malicious SQL query and sending it via multiple protocols, such as MySQL Connector, to the targeted MySQL Server. Successful exploitation of this vulnerability can result in denial-of-service (DOS) attacks, rendering the MySQL Server unresponsive and unavailable.

Code Snippet

Although the exact exploit code is not publicly available, the following hypothetical code snippet demonstrates how an attacker might craft a malicious SQL query to exploit this vulnerability:

SELECT * FROM table_name WHERE vulnerable_function(parameter1, parameter2);

In this example, vulnerable_function represents a function within the Server: Optimizer component that is vulnerable to exploitation in versions 8..32 and prior.

- Oracle Security Advisory: https://www.oracle.com/security-alerts/cpuoct2023.html
- CVE-2023-21945 Details: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-21945
- NIST National Vulnerability Database (NVD): https://nvd.nist.gov/vuln/detail/CVE-2023-21945

Mitigation and Recommendations

To protect against this vulnerability, users of affected versions (8..32 and prior) are advised to apply the patches provided by Oracle, available at the Oracle Security Advisory link mentioned above. Additionally, the following recommendations can help strengthen the security posture of your MySQL Server deployment:

Limit network access to the MySQL Server, allowing only trusted IPs and hostnames to connect.

4. Regularly review and monitor server logs for any signs of attempted exploits or other malicious activity.
5. Implement strong authentication and access control mechanisms, ensuring that only authorized users have access to the MySQL Server and related resources.

Conclusion

CVE-2023-21945 is a critical vulnerability that affects the Server: Optimizer component of the MySQL Server product of Oracle MySQL. Versions 8..32 and prior are susceptible to this vulnerability, which can allow high privileged attackers to compromise the MySQL Server and cause a hang or frequently repeatable crash (complete DOS). Users of affected versions should apply the provided patches as soon as possible and implement the recommended security measures to protect their MySQL Server deployments.

Timeline

Published on: 04/18/2023 20:15:00 UTC
Last modified on: 04/27/2023 15:15:00 UTC