CVE-2026-55856: Mariadb java client MariaDB Has Cleartext Password Disclosure Vulnerability

MODERATE
Advisory Identifier: GHSA-g9jj-cgmh-9f38
CVSS 5.9
CWE-522
Published
Advisory Summary

CVE-2026-55856 is a MODERATE (CVSS 5.9) mariadb has cleartext password disclosure vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Mariadb java client libraries in the Maven ecosystem. The issue involves mariadb has cleartext password disclosure to a mitm on the initial-handshake. Remediation is available by upgrading affected packages to version 2.7.14, 3.3.5, 3.4.3, 3.5.9.

CVE-2026-55856 at a Glance

CVE Identifier CVE-2026-55856
GHSA Identifier GHSA-g9jj-cgmh-9f38
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Mariadb java client
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-55856

To remediate this vulnerability, upgrade all affected Mariadb java client dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.mariadb.jdbc:mariadb-java-client fixed: 2.7.14
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>2.7.14</version>
</dependency>
org.mariadb.jdbc:mariadb-java-client fixed: 3.3.5
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>3.3.5</version>
</dependency>
org.mariadb.jdbc:mariadb-java-client fixed: 3.4.3
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>3.4.3</version>
</dependency>
org.mariadb.jdbc:mariadb-java-client fixed: 3.5.9
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>3.5.9</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.mariadb.jdbc

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-55856, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.mariadb.jdbc

Analyze the terminal output to locate any version of Mariadb java client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.14), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.mariadb.jdbc command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Mariadb java client, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary When a Java application connects with sslMode=verify-full (or verify-ca) and a password but does not pin a server certificate, Connector/J deliberately accepts an untrusted/self-signed certificate at the TLS layer (the "MITM-proof without a CA" feature) and proves the server's identity afterwards by binding the certificate fingerprint into the authentication exchange. That fingerprint enforcement is applied to the OK-packet and auth-switch paths but not to the initial-handshake path. An active man-in-the-middle that presents a self-signed certificate, claims to be MariaDB, and names the initial authentication plugin mysql_clear_password receives the victim's database password in cleartext, before any fingerprint/identity check runs. The connection is torn down a moment later, but the credential is already gone. ### Details For sslMode=verify-full/verify-ca with a password and no serverSslCert/trustStore, the connector falls back to an ephemeral trust manager (default fallbackToSystemTrustStore=true) that accepts any non-expired certificate at the TLS layer and records its fingerprint. Identity is then meant to be enforced via that fingerprint. The enforcement guard is present on two of the three paths, the OK-packet fingerprint check and the auth-switch handler (where the clear-password plugin is only allowed when the fingerprint is already verified). It is absent on the initial-handshake send: HandshakeResponse.encode() builds the mysql_clear_password response after checking only that SSL is enabled, never consulting the recorded fingerprint, sslMode, or whether the plugin is MITM-proof. By that point the connector already knows the certificate was self-signed. The clear-password plugin does not declare itself MITM-proof (it inherits the safe default), which confirms it is meant to be refused on an unverified certificate; the initial-handshake path simply never consults that flag. The initial path also bypasses restrictedAuth. ### Impact An active man-in-the-middle steals the full cleartext database password of any Java application using Connector/J with sslMode=verify-full/verify-ca plus a password and no pinned certificate, the configuration documented as the easy, secure default. With the captured credentials the attacker can take over the database account and read or modify all data that account is authorized for. The victim takes no unusual action; the developer explicitly enabled TLS verification expecting exactly this protection. ### Patches Fixed in 2.7.14, 3.3.5, 3.4.3, and 3.5.9. Upgrade to the patched release on your branch (3.5.x → 3.5.9, 3.4.x → 3.4.3, 3.0/3.1/3.2/3.3.x → 3.3.5, 2.x → 2.7.14). The fix applies the same certFingerprint != null && !isMitMProof() guard to the initial-handshake path before writing the auth response, refusing to send a mysql_clear_password (or any non-MITM-proof) response on an as-yet-unverified certificate, matching the auth-switch path. ### Workarounds If you cannot upgrade immediately, pin the server certificate (serverSslCert= the real CA / server cert). With a pinned certificate the self-signed certificate of a man-in-the-middle is rejected at the TLS layer before any password is transmitted. Credit Reported by haaahaaahiihiiii

CVE-2026-55856 Affected Mariadb java client Versions

4 component(s)
Fixed Versions:
2.7.143.3.53.4.33.5.9
Product / Package Ecosystem Affected Versions Fixed Version
org.mariadb.jdbc:mariadb-java-client
Maven
< 2.7.14
2.7.14
org.mariadb.jdbc:mariadb-java-client
Maven
≥ 3.0.0
< 3.3.5
3.3.5
org.mariadb.jdbc:mariadb-java-client
Maven
≥ 3.4.0
< 3.4.3
3.4.3
org.mariadb.jdbc:mariadb-java-client
Maven
≥ 3.5.0
< 3.5.9
3.5.9

References

Frequently Asked Questions

What is CVE-2026-55856?
CVE-2026-55856 is a security vulnerability in Mariadb java client involving MariaDB has cleartext password disclosure to a MITM on the initial-handshake under CWE-522: Insufficiently Protected Credentials.
Which Mariadb java client versions are affected?
Affected versions include releases prior to 2.7.14, 3.3.5, 3.4.3, 3.5.9 across affected packages: org.mariadb.jdbc:mariadb-java-client.
What version fixes CVE-2026-55856?
Upgrading to 2.7.14, 3.3.5, 3.4.3, 3.5.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mariadb-java-client affected?
Yes, org.mariadb.jdbc:mariadb-java-client is affected in releases prior to 2.7.14, 3.3.5, 3.4.3, 3.5.9. Upgrade your dependency to 2.7.14, 3.3.5, 3.4.3, 3.5.9 or later.
What is the CVSS score of CVE-2026-55856?
CVE-2026-55856 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-55856?
CVE-2026-55856 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check Maven dependencies for CVE-2026-55856?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.mariadb.jdbc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g9jj-cgmh-9f38",
  "modified" : "2026-08-28T22:41:56Z",
  "published" : "2026-08-28T22:41:56Z",
  "aliases" : [ "CVE-2026-55856" ],
  "summary" : "MariaDB has cleartext password disclosure to a MITM on the initial-handshake",
  "details" : "### Summary\n\nWhen a Java application connects with sslMode=verify-full (or verify-ca) and a password but does not pin a server certificate, Connector/J deliberately accepts an untrusted/self-signed certificate at the TLS layer (the \"MITM-proof without a CA\" feature) and proves the server's identity afterwards by binding the certificate fingerprint into the authentication exchange. That fingerprint enforcement is applied to the OK-packet and auth-switch paths but not to the initial-handshake path. An active man-in-the-middle that presents a self-signed certificate, claims to be MariaDB, and names the initial authentication plugin mysql_clear_password receives the victim's database password in cleartext, before any fingerprint/identity check runs. The connection is torn down a moment later, but the credential is already gone.\n\n### Details\n\nFor sslMode=verify-full/verify-ca with a password and no serverSslCert/trustStore, the connector falls back to an ephemeral trust manager (default fallbackToSystemTrustStore=true) that accepts any non-expired certificate at the TLS layer and records its fingerprint. Identity is then meant to be enforced via that fingerprint.\n\nThe enforcement guard is present on two of the three paths, the OK-packet fingerprint check and the auth-switch handler (where the clear-password plugin is only allowed when the fingerprint is already verified). It is absent on the initial-handshake send: HandshakeResponse.encode() builds the mysql_clear_password response after checking only that SSL is enabled, never consulting the recorded fingerprint, sslMode, or whether the plugin is MITM-proof. By that point the connector already knows the certificate was self-signed. The clear-password plugin does not declare itself MITM-proof (it inherits the safe default), which confirms it is meant to be refused on an unverified certificate; the initial-handshake path simply never consults that flag. The initial path also bypasses restrictedAuth.\n\n### Impact\n\nAn active man-in-the-middle steals the full cleartext database password of any Java application using Connector/J with sslMode=verify-full/verify-ca plus a password and no pinned certificate, the configuration documented as the easy, secure default. With the captured credentials the attacker can take over the database account and read or modify all data that account is authorized for. The victim takes no unusual action; the developer explicitly enabled TLS verification expecting exactly this protection.\n\n### Patches\n\nFixed in 2.7.14, 3.3.5, 3.4.3, and 3.5.9. Upgrade to the patched release on your branch (3.5.x → 3.5.9, 3.4.x → 3.4.3, 3.0/3.1/3.2/3.3.x → 3.3.5, 2.x → 2.7.14). The fix applies the same certFingerprint != null && !isMitMProof() guard to the initial-handshake path before writing the auth response, refusing to send a mysql_clear_password (or any non-MITM-proof) response on an as-yet-unverified certificate, matching the auth-switch path.\n\n### Workarounds\n\nIf you cannot upgrade immediately, pin the server certificate (serverSslCert= the real CA / server cert). With a pinned certificate the self-signed certificate of a man-in-the-middle is rejected at the TLS layer before any password is transmitted.\n\nCredit\n\nReported by haaahaaahiihiiii",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.mariadb.jdbc:mariadb-java-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.7.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.mariadb.jdbc:mariadb-java-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.3.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.mariadb.jdbc:mariadb-java-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.0"
      }, {
        "fixed" : "3.4.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.mariadb.jdbc:mariadb-java-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.5.0"
      }, {
        "fixed" : "3.5.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-j/security/advisories/GHSA-g9jj-cgmh-9f38"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-j/commit/149ec6a626376214966c01f42d48be1b80d06056"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-j/commit/d90b9872322c76b05a48219be66bff1d33102f8a"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/3777370"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.4.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.5.9"
  }, {
    "type" : "WEB",
    "url" : "https://jira.mariadb.org/browse/CONJ-1325"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-28T22:41:56Z",
    "nvd_published_at" : null
  }
}