CVE-2023-21872
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedVulnerability in the MySQL Server product of Oracle MySQL (component: Server: Optimizer). Supported versions that are affected are 8.0.29 and prior. 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 as well as unauthorized update, insert or delete access to some of MySQL Server accessible data. CVSS 3.1 Base Score 5.5 (Integrity and Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:H).
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA vulnerability in the MySQL Server Optimizer component allows a high-privileged attacker with network access to cause a denial of service (hang or crash) and gain unauthorized insert, update, or delete access to certain accessible data. The attack is easily exploitable but requires high-level database privileges.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 8.0.0, <= 8.0.29CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- High
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify MySQL Server versionRun 'SELECT VERSION();' or check the MySQL server binary/version using 'mysqld --version' or checking the installed package information (e.g., 'rpm -q mysql-server' or 'dpkg -l mysql-server').Affected if The installed version is greater than or equal to 8.0.0 and less than or equal to 8.0.29.
-
Confirm network accessibilityCheck if MySQL is listening on a network interface (typically port 3306) by reviewing MySQL configuration files (my.cnf or my.ini) for 'bind-address' settings, or by running 'netstat -tlnp | grep 3306' or 'ss -tlnp | grep 3306'.Affected if MySQL is bound to a non-localhost address (0.0.0.0 or specific IP) and is reachable over the network.
-
Identify high-privileged accountsQuery for users with elevated privileges using 'SELECT user, host, plugin FROM mysql.user WHERE priv_level IN ('Select_priv','Insert_priv','Update_priv','Delete_priv') AND user NOT IN ('root','mysql.infoschema','mysql.session','mysql.sys');' Review accounts with DBA, ADMIN, or broad INSERT/UPDATE/DELETE privileges.Affected if There are multiple high-privileged accounts beyond the root and system accounts, as an attacker would need one of these to exploit the vulnerability.
-
Check optimizer-related activityReview slow query logs or general query logs for complex queries involving JOIN operations, subqueries, or optimizer hints, as the vulnerability exists in the Optimizer component. Enable slow query logging if not already active: 'SET GLOBAL slow_query_log = 1; SET GLOBAL long_query_time = 0;'.Affected if Complex optimizer-dependent queries are being executed, indicating active use of the affected component.
You are affected if your MySQL Server version is between 8.0.0 and 8.0.29 inclusive AND the server is network-accessible AND there exists a high-privileged account that could be compromised.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade MySQL Server to version 8.0.30 or later. If immediate patching is not possible, restrict network access to the database and limit privileged account usage to reduce attack surface.
MySQL Server 8.0.30 or later
- 1. Back up all MySQL databases before performing any upgrade
- 2. Review MySQL 8.0.30 release notes for any breaking changes relevant to your configuration
- 3. Stop the MySQL Server service
- 4. Upgrade MySQL Server to version 8.0.30 or later
- 5. Run mysql_upgrade to check and update system tables if needed
- 6. Restart the MySQL Server service
- 7. Verify the server is running and test application functionality
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing8.0 h
- Review / QA4.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,656.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2023-21872 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2023-21872 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data