# CVE-2023-52968: Null dereference in MariaDB

> A null pointer dereference in MariaDB Server allows attackers to cause a crash and denial of service via crafted queries.

- **Severity:** Medium 4.9 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Mar 2025
- **Updated:** 10 Mar 2025
- **Also known as:** BELL-CVE-2023-52968, BIT-mariadb-2023-52968, BIT-mariadb-min-2023-52968, BIT-mysql-client-2023-52968, DEBIAN-CVE-2023-52968, GHSA-7c2c-wp2q-q5vx, UBUNTU-CVE-2023-52968

## What is CVE-2023-52968?

CVE-2023-52968 is a medium-severity vulnerability in MariaDB, published on 8 Mar 2025. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

MariaDB Server 10.4 before 10.4.33, 10.5 before 10.5.24, 10.6 before 10.6.17, 10.7 through 10.11 before 10.11.7, 11.0 before 11.0.5, and 11.1 before 11.1.4 calls fix_fields_if_needed under mysql_derived_prepare when derived is not yet prepared, leading to a find_field_in_table crash.

Weakness: CWE-696 (Incorrect Behavior Order)

## Which versions are affected by CVE-2023-52968?

3 open source packages ship an affected version, including mariadb, mariadb-min and mysql-client.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mariadb` | Bitnami | From 10.4.0 | 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4 |
| `mariadb-min` | Bitnami | From 10.4.0 | 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4 |
| `mysql-client` | Bitnami | From 10.4.0 | 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4 |

## How do I fix CVE-2023-52968?

Upgrade mariadb to a fixed version for your release line: 10.4.33, 10.5.24, 10.6.17 or 10.11.7.

## Is CVE-2023-52968 being exploited?

There is no known exploitation of CVE-2023-52968 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-52968 and fix it if it is affected.

What it is: CVE-2023-52968 is a medium-severity vulnerability in MariaDB, published on 8 Mar 2025. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-52968 in the wild and no public exploit code.

Affected packages and fixed versions:
- mariadb (Bitnami): affected from 10.4.0; fixed in 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4
- mariadb-min (Bitnami): affected from 10.4.0; fixed in 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4
- mysql-client (Bitnami): affected from 10.4.0; fixed in 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-52968/ (Markdown: https://insights.sbomify.com/CVE-2023-52968/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-52968
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-52968
- OSV: https://osv.dev/vulnerability/CVE-2023-52968

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-52968/
Summaries are generated and may contain mistakes; the official description above is the record.
