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, when a Java application connects with sslMode=verify-full or sslMode=verify-ca, supplies a password, and does not configure serverSslCert or trustStore, Connector/J can accept an untrusted self-signed certificate through the fallbackToSystemTrustStore=true ephemeral trust manager and record its certFingerprint for later identity binding. The OK-packet and authentication-switch paths enforce the certificate fingerprint, but the initial-handshake path does not. HandshakeResponse.encode() can therefore build and send a mysql_clear_password response before checking certFingerprint != null && !isMitMProof(), sslMode, or whether the authentication plugin is resistant to a man-in-the-middle, and the initial path also bypasses restrictedAuth. An active man-in-the-middle or hostile server can present a self-signed certificate, claim to be MariaDB, select mysql_clear_password as the initial authentication plugin, and receive the full database password before the connection is rejected. 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

This vulnerability allows an attacker to obtain the cleartext database password during the initial SSL handshake of a MariaDB Connector/J connection. When the client uses sslMode=verify-full or sslMode=verify-ca but does not supply a trusted server certificate or trust store, the connector accepts a self‑signed certificate through an fallback trust manager and records its fingerprint. The initial authentication path, however, does not enforce that fingerprint before sending a mysql_clear_password response. As a result, an active man‑in‑the‑middle or a malicious server can present its own certificate, use the mysql_clear_password plugin, and capture the password before the connection is rejected. The weakness is an improper protection of stored information (CWE-522).

Affected Systems

MariaDB Connector/J supplied by MariaDB Corporation. Versions lower than 2.7.14, 3.3.5, 3.4.3, and 3.5.9 are affected. The issue is mitigated in these releases and later versions.

Risk and Exploitability

The CVSS score is 5.9, indicating a medium severity risk. No EPSS score is available, but the lack of a KEV listing suggests no known active exploit at the time of analysis. An attacker would need network access to the client or to lie as the database server during SSL negotiation. The vulnerability can be exploited when sslMode is set to verify-full or verify-ca without a configured trusted certificate store, and the client accepts mysql_clear_password as the initial authentication plugin. If the attacker succeeds, they obtain the full database credentials in cleartext. The problem is resolved in the patched Connector/J versions.

Generated by OpenCVE AI on August 28, 2026 at 23:19 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
  • Configure the client with a trusted serverSslCert or trustStore to prevent acceptance of self‑signed certificates
  • Avoid using mysql_clear_password as the initial authentication plugin or use a secure authentication plugin that resists man‑in‑the‑middle attacks

Generated by OpenCVE AI on August 28, 2026 at 23:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-g9jj-cgmh-9f38 MariaDB has cleartext password disclosure to a MITM on the initial-handshake
History

Fri, 28 Aug 2026 22:45: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, when a Java application connects with sslMode=verify-full or sslMode=verify-ca, supplies a password, and does not configure serverSslCert or trustStore, Connector/J can accept an untrusted self-signed certificate through the fallbackToSystemTrustStore=true ephemeral trust manager and record its certFingerprint for later identity binding. The OK-packet and authentication-switch paths enforce the certificate fingerprint, but the initial-handshake path does not. HandshakeResponse.encode() can therefore build and send a mysql_clear_password response before checking certFingerprint != null && !isMitMProof(), sslMode, or whether the authentication plugin is resistant to a man-in-the-middle, and the initial path also bypasses restrictedAuth. An active man-in-the-middle or hostile server can present a self-signed certificate, claim to be MariaDB, select mysql_clear_password as the initial authentication plugin, and receive the full database password before the connection is rejected. This issue is fixed in versions 2.7.14, 3.3.5, 3.4.3, and 3.5.9.
Title MariaDB Connector/J: Cleartext password disclosure to a MITM on the initial-handshake
Weaknesses CWE-522
References
Metrics cvssV3_1

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


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-28T22:41:14.376Z

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

Link: CVE-2026-55856

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-55856

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T23:30:17Z

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials