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.
Published: 2026-08-28
Score: 5.9 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The connector assumes the client character set is UTF‑8 and performs encoding and escaping accordingly. If the server changes character_set_client to a non‑UTF‑8 value during a session, the driver continues to read and write UTF‑8 bytes while the server interprets those bytes under the new encoding, resulting in silent data corruption and a failure of quoting or escaping logic. This flaw does not provide remote code execution or privilege escalation but can compromise data integrity and reliability of database transactions.

Affected Systems

MariaDB Connector/J for Java is affected when its version is older than 2.7.14, 3.3.5, 3.4.3, or 3.5.9. All earlier releases that rely on the UTF‑8 assumption are vulnerable and require an upgrade to one of the listed patched versions.

Risk and Exploitability

The CVSS score of 5.9 places the flaw in the moderate range. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. Exploitation is most likely possible when a trusted or malicious server issues a mid‑session change to character_set_client, or when server configuration or stored routines alter the setting. An attacker who can influence the server’s character set can trigger data corruption in the client application. The lack of a KEV listing and moderate score suggest the risk is non‑critical but still relevant for environments that rely on precise data handling.

Generated by OpenCVE AI on August 29, 2026 at 00:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade MariaDB Connector/J to version 2.7.14, 3.3.5, 3.4.3, or 3.5.9 or later to enforce UTF‑8 only after initialization.
  • Ensure the database server’s default client character set remains UTF‑8 and that any SET NAMES, stored procedures, or triggers do not change character_set_client to a non‑UTF‑8 value.
  • Audit client applications to verify that they use a consistent, UTF‑8 based connection and monitor for any explicit client or server charset modifications.

Generated by OpenCVE AI on August 29, 2026 at 00:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-xvr9-35cr-46v9 org.mariadb.jdbc:mariadb-java-client has Inappropriate Encoding for Output Context
History

Fri, 28 Aug 2026 23:00:00 +0000

Type Values Removed Values Added
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.
Title MariaDB Connector/J: Inappropriate Encoding for Output Context in org.mariadb.jdbc:mariadb-java-client
Weaknesses CWE-838
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-28T22:46:40.114Z

Reserved: 2026-06-17T16:44:40.995Z

Link: CVE-2026-55858

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-28T23:17:08.827

Modified: 2026-08-28T23:17:08.827

Link: CVE-2026-55858

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-29T00:30:17Z

Weaknesses
  • CWE-838

    Inappropriate Encoding for Output Context