---
id: "CVE-2026-119281"
kind: "vulnerability"
aliases: ["CVE-2026-119281"]
title: "MariaDB Connector/J: result charset change can bypass Java string validation"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["java", "jdbc", "mariadb", "mysql", "package"]
not_affected_if: ["default-config", "trusted-database-only"]
published_at: "2026-10-29T21:17:21+00:00"
first_seen_at: "2026-10-29T21:26:52+00:00"
updated_at: "2026-10-29T21:28:46+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119281", "first_seen_at": "2026-10-29T21:26:52+00:00"}]
---

# MariaDB Connector/J: result charset change can bypass Java string validation

MariaDB Connector/J, the Java driver for MariaDB and MySQL, did not reject non-UTF-8 result character set changes from the server. A malicious server or a man-in-the-middle could make decoded strings differ from the returned bytes, which can defeat validation or escaping the application relies on.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Find the `mariadb-java-client` version in the project build file (`pom.xml`, `build.gradle`) or the resolved dependency tree.
- Check whether the version is between `3.0.0` and `3.3.7`, `3.4.5`, or `3.5.11`.

## Fix

- Upgrade to `3.3.7`, `3.4.5`, or `3.5.11`, matching the release line in use.

## Timeline

- 2026-10-29T21:26:52+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119281

## From the sources

MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.11, the connector assumed result bytes were UTF-8 but guarded only changes to character_set_client. It did not reject non-UTF-8 character_set_results changes and relied on the server's global session_track_system_variables configuration to report character-set changes. A malicious or compromised server, or a machine-in-the-middle attacker, could suppress tracking or change the result charset so application strings differed from the returned bytes, potentially defeating application-side validation or escaping that depended on the decoded values. This issue is fixed in versions 3.3.7, 3.4.5, and 3.5.11.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
