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: < 1% Very Low
KEV: No
Impact: Plaintext password disclosure over the network
Action: Apply Patch
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 fails to supply a trusted server certificate or trust store, the connector accepts a self‑signed certificate through a fallback trust manager and records its fingerprint. The initial authentication path does not enforce that fingerprint before sending a mysql_clear_password response, exposing the password. The flaw corresponds to CWE‑295 – cleartext transmission of sensitive information – and to CWE‑522 – inadequate protection of stored credentials. The attacker can thus perform a man‑in‑the‑middle or malicious server impersonation and capture the password before the connection is rejected.

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. The EPSS score is 0.00222 (0.222%), indicating a very low but non‑zero probability that this vulnerability will be exploited; its KEV status is not listed, suggesting no known active exploitation. 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 September 3, 2026 at 15:00 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 September 3, 2026 at 15:00 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

Thu, 03 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-295
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 31 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 31 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
First Time appeared Mariadb-corporation
Mariadb-corporation mariadb-connector-j
Vendors & Products Mariadb-corporation
Mariadb-corporation mariadb-connector-j

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

Mariadb-corporation Mariadb-connector-j
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-31T18:37:36.732Z

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

Link: CVE-2026-55856

cve-icon Vulnrichment

Updated: 2026-08-31T18:37:32.942Z

cve-icon NVD

Status : Awaiting Analysis

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

Modified: 2026-09-08T21:08:37.320

Link: CVE-2026-55856

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-28T22:41:14Z

Links: CVE-2026-55856 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-03T15:15:05Z

Weaknesses
  • CWE-295

    Improper Certificate Validation

  • CWE-522

    Insufficiently Protected Credentials