# CVE-2026-55858: MariaDB Connector/J: Inappropriate Encoding for Output Context in org.mariadb.jdbc:mariadb-java-client

> A character set mismatch in MariaDB Connector/J allows attackers to bypass escaping mechanisms, potentially leading to SQL injection or data corruption.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Aug 2026
- **Updated:** 1 Sep 2026
- **Also known as:** CLEANSTART-2026-GM04260, CLEANSTART-2026-JW77744, CLEANSTART-2026-KS34405, CLEANSTART-2026-VV64101, ECHO-2abe-4d67-0f4b, GHSA-xvr9-35cr-46v9, MINI-3cwr-3p22-cr7j, MINI-6g5g-665j-6xx3, MINI-8rjr-p5pq-w5gc, MINI-92cr-32hp-x55r, MINI-ff4p-w6cm-8cpq, MINI-jh75-266w-w998, MINI-jj5j-pm4h-585h, MINI-jqgr-hqx6-mmw6, MINI-pp4p-rmxw-c2jr, MINI-q552-m4r7-vgfw, MINI-qmgh-wj7v-78p8, MINI-rhf4-267r-87m5, MINI-rjhx-jx65-6cpq, MINI-vm53-pff9-58vc, MINI-xcwg-58g8-ghhc

## What is CVE-2026-55858?

CVE-2026-55858 is a medium-severity SQL injection vulnerability in mariadb-corporation mariadb-connector-j, published on 28 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. Prior to 2.7.14, 3.3.5, 3.4.3, and 3.5.9, the connector encodes and decodes protocol text and performs client-side escaping under the assumption that the connection character set is UTF-8. The server can report a mid-session change to character_set_client through OK-packet session-state tracking, including a change caused by SET NAMES, a stored routine or trigger, server configuration, or a hostile server. If character_set_client changes to a non-UTF-8 value, the driver continues to read and write UTF-8 while the server interprets the same bytes under another encoding, causing silent data corruption and a client/server charset-confusion mismatch that can defeat byte-wise quoting or escaping. The fix accepts only utf8, utf8mb3, or utf8mb4 after initialization; any other value causes SQLException with SQLState 08000 and closes the connection. This issue is fixed in versions 2.7.14, 3.3.5, 3.4.3, and 3.5.9.

Weakness: CWE-838 (Inappropriate Encoding for Output Context)

## Which versions are affected by CVE-2026-55858?

8 open source packages ship an affected version, including org.mariadb.jdbc:mariadb-java-client.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | All versions | 2.7.14 |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | All versions | 2.7.14 |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | From 3.0.0 | 3.3.5 |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | From 3.0.0 | 3.3.5 |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | From 3.4.0 | 3.4.3 |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | From 3.4.0 | 3.4.3 |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | From 3.5.0 | 3.5.9 |
| `org.mariadb.jdbc:mariadb-java-client` | Maven | From 3.5.0 | 3.5.9 |

## How do I fix CVE-2026-55858?

Upgrade org.mariadb.jdbc:mariadb-java-client to a fixed version for your release line: 2.7.14, 3.3.5, 3.4.3 or 3.5.9.

## Is CVE-2026-55858 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-55858 and fix it if it is affected.

What it is: CVE-2026-55858 is a medium-severity SQL injection vulnerability in mariadb-corporation mariadb-connector-j, published on 28 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-55858 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.mariadb.jdbc:mariadb-java-client (Maven): affected all versions; fixed in 2.7.14
- org.mariadb.jdbc:mariadb-java-client (Maven): affected all versions; fixed in 2.7.14
- org.mariadb.jdbc:mariadb-java-client (Maven): affected from 3.0.0; fixed in 3.3.5
- org.mariadb.jdbc:mariadb-java-client (Maven): affected from 3.0.0; fixed in 3.3.5
- org.mariadb.jdbc:mariadb-java-client (Maven): affected from 3.4.0; fixed in 3.4.3
- org.mariadb.jdbc:mariadb-java-client (Maven): affected from 3.4.0; fixed in 3.4.3
- org.mariadb.jdbc:mariadb-java-client (Maven): affected from 3.5.0; fixed in 3.5.9
- org.mariadb.jdbc:mariadb-java-client (Maven): affected from 3.5.0; fixed in 3.5.9

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-2026-55858/ (Markdown: https://insights.sbomify.com/CVE-2026-55858/index.md)
```

## Sources

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

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