CVE-2026-55856

MariaDB Connector/J: Cleartext password disclosure to a MITM on the initial-handshake

Published Aug 28, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Mariadb-corporation
Mariadb-corporation mariadb-connector-j
Vendors & Products Mariadb-corporation
Mariadb-corporation mariadb-connector-j
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'}

Weaknesses
  • CWE-295

    Improper Certificate Validation

  • CWE-522

    Insufficiently Protected Credentials

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 31, 2026, 6:37 PM
Reserved
Jun 17, 2026, 4:44 PM
Status
Awaiting Analysis
Published
Aug 28, 2026, 11:17 PM
Modified
Sep 8, 2026, 9:08 PM
Severity
Moderate
Public date
Aug 28, 2026, 10:41 PM