# CVE-2026-55858: MariaDB Java Client charset confusion encoding mismatch

Source: https://junglewise.ai/threats/cve-2026-55858-mariadb-java-client-charset-confusion-encoding-mismatch  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-28. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-55858 · Severity: medium · CVSS 5.9 · Published 2026-08-28

The MariaDB Java database driver assumes all character data is encoded in UTF-8, but fails to validate when a database server changes the character set mid-connection to a non-UTF-8 encoding. This causes silent data corruption where the driver and server interpret the same bytes differently, and can lead to SQL injection attacks by bypassing the driver's quoting and escaping mechanisms.

Technologies: [org.mariadb.jdbc:mariadb-java-client (Maven)](https://junglewise.ai/threats/technologies/org-mariadb-jdbc-mariadb-java-client). Vendors: [Mariadb](https://junglewise.ai/threats/vendors/mariadb), [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

**Is CVE-2026-55858 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-55858 being exploited in the wild.

**How severe is CVE-2026-55858?** Medium severity, with a CVSS score of 5.9, published 28 August 2026.

**Which products and versions are affected?** Mariadb-Java-Client < 2.7.14, >= 3.0.0 and < 3.3.5, >= 3.4.0 and < 3.4.3, >= 3.5.0 and < 3.5.9; org.mariadb.jdbc:mariadb-java-client (Maven) ECOSYSTEM:introduced=0,fixed=2.7.14.

**Is there a fix for CVE-2026-55858?** Yes. org.mariadb.jdbc:mariadb-java-client (Maven): upgrade to 2.7.14 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-55858 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-55858?** Check whether you run Mariadb-Java-Client or org.mariadb.jdbc:mariadb-java-client (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.mariadb.jdbc:mariadb-java-client (Maven): upgrade to 2.7.14 or later

  ```sh
  # set org.mariadb.jdbc:mariadb-java-client to 2.7.14 in your pom.xml or build.gradle
  ```


## Technical details

The vulnerability is a character encoding mismatch (CWE-838) in the MariaDB Java JDBC driver. The driver hardcodes the assumption that all character data is UTF-8 encoded and does not dynamically track or validate charset changes. An attacker who can influence the database connection (e.g., via a compromised server or man-in-the-middle position) can issue SET NAMES or similar commands to change character_set_client to a non-UTF-8 charset. After this change, the driver continues to encode/decode data as UTF-8 while the server interprets the bytes as a different encoding, leading to silent data corruption. More critically, this charset confusion undermines the byte-wise semantics of the driver's parameterized query escaping, potentially allowing SQL injection. Patches were released for versions 2.7.14, 3.3.5, 3.4.3, and 3.5.9; the fix rejects any post-initialization charset change to non-UTF-8 values and closes the connection with a SQLException.

## Affected products

- MariaDB mariadb-java-client < 2.7.14, >= 3.0.0 and < 3.3.5, >= 3.4.0 and < 3.4.3, >= 3.5.0 and < 3.5.9

## Identifiers

- CVE-2026-55858
- GHSA-xvr9-35cr-46v9

## Timeline

- 2026-08-28: disclosed
- 2026-08-28: patched: Fixed in versions 2.7.14, 3.3.5, 3.4.3, and 3.5.9

## References

- [https://api.github.com/users/fg0x0](https://api.github.com/users/fg0x0)
- [https://github.com/fg0x0](https://github.com/fg0x0)
- [https://api.github.com/users/fg0x0/gists%7B/gist_id%7D](https://api.github.com/users/fg0x0/gists%7B/gist_id%7D)
- [https://api.github.com/users/fg0x0/repos](https://api.github.com/users/fg0x0/repos)
- [https://avatars.githubusercontent.com/u/35772301?v=4](https://avatars.githubusercontent.com/u/35772301?v=4)
- [https://api.github.com/users/fg0x0/events%7B/privacy%7D](https://api.github.com/users/fg0x0/events%7B/privacy%7D)

## Related threats

- [MariaDB Connector/J character set validation bypass](https://junglewise.ai/threats/cve-2026-119281-mariadb-connector-j-is-used-to-connect-applications-developed-in)
- [MariaDB Connector/J: XA recover() trusted server-supplied gtrid and bqual lengths](https://junglewise.ai/threats/cve-2026-119280-mariadb-connector-j-is-used-to-connect-applications-developed-in)
- [MariaDB Connector/J integer overflow in length encoding](https://junglewise.ai/threats/cve-2026-119279-mariadb-connector-j-is-used-to-connect-applications-developed-in)
- [MariaDB Connector/J heap allocation denial of service](https://junglewise.ai/threats/cve-2026-119276-mariadb-connector-j-is-used-to-connect-applications-developed-in)
- [MariaDB Connector/J LOAD DATA LOCAL INFILE bypass in metadata queries](https://junglewise.ai/threats/cve-2026-119210-mariadb-connector-j-is-used-to-connect-applications-developed-in)
