GHSA-grfq-r75j-rw9x: MariaDB Connector/J: Server could switch character_set_results away from UTF-8 without the client noticing

Published Oct 29, 2026
·
Updated

Summary

MariaDB Connector/J decodes every result as UTF-8 and guards charactersetclient against a change to another charset, but did not guard charactersetresults, and relied on the server's global sessiontracksystemvariables list to be told about charset changes at all.

Details

The connector learns about session variable changes through session tracking, and closes the connection when charactersetclient is switched away from UTF-8, so that its UTF-8 decoding stays correct. Two gaps remained:

- charactersetresults was not guarded: a server could switch it to another charset, after which the bytes of every result were decoded as UTF-8 although encoded otherwise. - the list of tracked variables came from the server's global sessiontracksystemvariables: a server configured, or made, not to track the character set variables could change them silently.

The fix requests an explicit session tracking list that includes both character set variables whatever the server's global setting, and closes the connection when charactersetresults is changed to a charset other than utf8, utf8mb3 or utf8mb4, as it already did for charactersetclient.

Impact

Integrity: a malicious or compromised server, or a MitM, can make the strings an application reads differ from the bytes the server returned (inappropriate encoding for the output context), which can defeat application-side validation or escaping built on those values. Exploitation requires control of the server side of the connection; no confidentiality or availability impact.

Credit

Reported by fg0x0

Other 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 charactersetclient. It did not reject non-UTF-8 charactersetresults changes and relied on the server's global sessiontracksystemvariables 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.

— OSV

Affected Software

3 affected componentsFixes available
maven/org.mariadb.jdbc:mariadb-java-client>=3.5.0<3.5.11
3.5.11
maven/org.mariadb.jdbc:mariadb-java-client>=3.4.0<3.4.5
3.4.5
maven/org.mariadb.jdbc:mariadb-java-client>=3.0.0<3.3.7
3.3.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.mariadb.jdbc:mariadb-java-client to a version that resolves this vulnerability.

    Fixed in 3.5.11
  2. Upgrade

    Upgrade maven/org.mariadb.jdbc:mariadb-java-client to a version that resolves this vulnerability.

    Fixed in 3.4.5
  3. Upgrade

    Upgrade maven/org.mariadb.jdbc:mariadb-java-client to a version that resolves this vulnerability.

    Fixed in 3.3.7
  4. Upgrade

    Upgrade MariaDB Connector/J to a version that resolves this vulnerability.

    Fixed in 3.3.7

Event History

Oct 29, 2026
CVE Published
via OSV·08:58 PM
Data Sourced
via OSV·08:58 PM
DescriptionSeverityWeakness
Oct 30, 2026
Advisory Published
via GitHub·10:59 PM
Data Sourced
via GitHub·10:59 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·10:59 PM
Affected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203