Описание
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.
A flaw was found in MariaDB Connector/J, a component used to connect Java applications to MariaDB and MySQL databases. The connector incorrectly assumes a UTF-8 character set for communication, even if the database server changes its client character set to a non-UTF-8 value during a session. This mismatch can lead to silent data corruption, where data is written and read incorrectly, and may also allow attackers to bypass security mechanisms like byte-wise quoting or escaping.
Отчет
MariaDB Connector/J (org.mariadb.jdbc:mariadb-java-client) encodes and decodes the wire protocol and performs client-side escaping assuming a UTF-8 connection character set. If the server signals a mid-session change of character_set_client to a non-UTF-8 value (via SET NAMES, a stored routine or trigger, server configuration, or a hostile server), the driver continues to read and write UTF-8 while the server interprets those bytes under another encoding, causing silent data corruption and potentially defeating byte-wise quoting or escaping. Red Hat rates the impact of this flaw as Moderate: exploitation requires either a hostile/compromised server or a server-side configuration that changes the client character set mid-session, and the primary consequence is to data integrity rather than confidentiality or availability.
Меры по смягчению последствий
Upgrade MariaDB Connector/J to a fixed version (2.7.14, 3.3.5, 3.4.3, or 3.5.9, as appropriate for the branch in use), which rejects any post-initialization character set other than utf8, utf8mb3, or utf8mb4 and closes the connection. Where upgrading is not immediately possible, avoid changing character_set_client after connection establishment and connect only to trusted database servers.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| OpenShift Pipelines | openshift-pipelines/pipelines-console-plugin-pf5-rhel9 | Affected | ||
| OpenShift Pipelines | openshift-pipelines/pipelines-console-plugin-rhel8 | Affected | ||
| OpenShift Pipelines | openshift-pipelines/pipelines-console-plugin-rhel9 | Affected | ||
| OpenShift Pipelines | openshift-pipelines/pipelines-hub-ui-rhel8 | Affected | ||
| OpenShift Pipelines | openshift-pipelines/pipelines-hub-ui-rhel9 | Affected | ||
| OpenShift Service Mesh 3 | openshift-service-mesh/kiali-rhel9-operator | Not affected | ||
| Red Hat build of Debezium 3 | mariadb-java-client | Fix deferred | ||
| Red Hat Build of Keycloak | keycloak/rhbk-openshift-rhel9 | Fix deferred | ||
| Red Hat Build of Keycloak | mariadb-java-client | Fix deferred | ||
| Red Hat Build of Keycloak | rhbk/keycloak-rhel9 | Fix deferred |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
5.9 Medium
CVSS3
Связанные уязвимости
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
org.mariadb.jdbc:mariadb-java-client has Inappropriate Encoding for Output Context
5.9 Medium
CVSS3