CVE-2026-55857
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
MariaDB Connector/J is MariaDB's JDBC driver: a JDBC 4.2 compatible driver used to connect applications developed in Java to MariaDB and MySQL databases. It is published to Maven Central as org.mariadb.jdbc:mariadb-java-client, and Spring Boot 2.7.18 manages its 3.1.4 release.
An information exposure vulnerability (CVE-2026-55857) has been identified in the PAM (dialog) authentication plugin of MariaDB Connector/J, which allows attackers to obtain the database account password in cleartext. A hostile server, or a man-in-the-middle on an insecure connection, can send an Authentication Switch Request for the dialog plugin, and the driver answers with the user's password, which can then be reused to authenticate to the database.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of MariaDB Connector/J.
Details
Module Info
- Product: MariaDB Connector/J
- Affected packages:
org.mariadb.jdbc:mariadb-java-client - Affected versions: <2.7.14, >=3.0.0 <3.3.5, >=3.4.0 <3.4.3, >=3.5.0 <3.5.9
- GitHub repository: https://github.com/mariadb-corporation/mariadb-connector-j
- Published packages: https://central.sonatype.com/artifact/org.mariadb.jdbc/mariadb-java-client
- Package manager: Maven
- Fixed in:
- OSS MariaDB Connector/J 3.4.3, 3.5.9
- NES for MariaDB Connector/J v3.1.7
Vulnerability Info
This Medium-severity vulnerability is found in the org.mariadb.jdbc:mariadb-java-client package in multiple versions of MariaDB Connector/J.
The PAM authentication plugin, which the server selects under the name dialog, sends the account password to the server in cleartext, but the driver does not require a secure transport before running it. During connection setup, the driver handles a server's Authentication Switch Request by loading whichever plugin the server names and running it, with no check of the transport. In the 3.1.x line this happens in ConnectionHelper.authenticationHandler:
case 0xFE:
AuthSwitchPacket authSwitchPacket = AuthSwitchPacket.decode(buf);
AuthenticationPlugin authenticationPlugin =
AuthenticationPluginLoader.get(authSwitchPacket.getPlugin(), conf);
authenticationPlugin.initialize(
credential.getPassword(), authSwitchPacket.getSeed(), conf);
buf = authenticationPlugin.process(writer, reader, context);
break;When the server asks for dialog, SendPamAuthPacket.process writes the password to the socket as raw UTF-8 bytes followed by a null terminator:
byte[] bytePwd = password != null ? password.getBytes(StandardCharsets.UTF_8) : new byte[0];
out.writeBytes(bytePwd, 0, bytePwd.length);
out.writeByte(0);
out.flush();Because the server chooses the plugin, a hostile server, or an attacker who can intercept a plain TCP connection and impersonate the server, can request dialog and read the password. This is reachable with the default configuration, where TLS is not enabled and no allow-list of authentication plugins is set through restrictedAuth. In releases that can identify the server only by a self-signed certificate fingerprint, such connections are also exposed, while connections over properly verified TLS or a local Unix socket are not.
Mitigation
MariaDB plc's Engineering Policy lists MariaDB Connector/J 2.7, 3.3, 3.4 and 3.5 as its supported release series. Upstream has made no 3.1.x release since 3.1.4 (April 2023), so no 3.1.x release is available to address this issue. For more information, see here.
Users of the affected components should apply one of the following mitigations:
- Upgrade affected applications to a currently supported release of MariaDB Connector/J that contains the fix.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- Yalguun Tumenkhuu (finder)