CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-55856

CVE-2026-55856: Credential Disclosure via Out-of-Order Handshake in MariaDB Connector/J

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 29, 2026·5 min read·4 visits

Executive Summary (TL;DR)

MariaDB Connector/J allows a Man-in-the-Middle attacker to intercept and steal plaintext database passwords because the driver transmits authentication responses during initial handshakes before enforcing certificate fingerprint verification checks.

A critical credential disclosure vulnerability in MariaDB Connector/J allows remote attackers to capture raw database passwords. The driver transmits plaintext passwords prior to verifying TLS certificate fingerprints when configured in ephemeral trust fallback states.

Vulnerability Overview

MariaDB Connector/J provides database connectivity for Java-based applications. The driver implements a fallback mechanism to facilitate SSL-enabled connections when explicit trust stores or pinned certificates are omitted. When a client connects using sslMode=verify-ca or sslMode=verify-full without a configured trustStore or serverSslCert, the connector defaults to using an ephemeral trust manager.

This trust manager allows the TLS connection to establish with untrusted certificates, storing the SHA-256 certificate fingerprint for later identity validation. The security architecture relies on verifying the fingerprint during subsequent stages, specifically within the OK packet or authentication-switch sequences. This deferred verification model creates an exposure window where the client communicates over an unverified socket.

An active adversary-in-the-middle or a rogue database server can exploit this state by presenting a self-signed TLS certificate. Because the client delays identity verification, the channel is treated as trusted during the early handshake steps. The attacker can then force a cleartext authentication mechanism and receive credentials before the connection is aborted.

Root Cause Analysis

The root cause of the vulnerability lies in the out-of-order execution logic in StandardClient.java. During protocol initialization, the database server sends an InitialHandshakePacket indicating its supported capabilities and the preferred initial authentication plugin. If the server demands mysql_clear_password as the initial plugin, the driver prepares a response to satisfy this request.

In vulnerable versions of the driver, HandshakeResponse.encode() is called to construct the client handshake packet. This method processes the database credentials and serializes the raw password into the socket buffer. The driver performs this write operation before verifying whether the remote server certificate matches the stored fingerprint state.

Additionally, this initial handshake path bypasses the driver's restricted authentication settings (restrictedAuth). The client is forced to transmit raw credentials across an unverified connection without executing any of the defensive checks intended to protect sensitive data transfers.

Code-Level Vulnerability & Patch Analysis

A comparison of the codebase before and after the remediation highlights the implementation of strict sequence gates. In vulnerable versions, HandshakeResponse was instantiated and encoded before the driver initialized the authentication plugin or evaluated the state of the TLS certificate fingerprint.

// VULNERABLE SEQUENCE
new HandshakeResponse(...).encode(writer, context);
authPlugin = "mysql_clear_password".equals(authenticationPluginType)
    ? new ClearPasswordPlugin()
    : new NativePasswordPlugin();
writer.flush();

The patch restructures this logic in StandardClient.java to perform validation prior to encoding and sending the handshake payload. The driver now determines the authentication plugin type beforehand and asserts connection trust properties.

// PATCHED SEQUENCE
authPlugin =
    "mysql_clear_password".equals(authenticationPluginType)
        ? new ClearPasswordPlugin()
        : new NativePasswordPlugin();
 
if (authPlugin.requireSsl()
    && !context.hasClientCapability(SSL)
    && !(socket instanceof UnixDomainSocket)) {
  throw context.getExceptionFactory().create("Plain TCP transport is blocked for cleartext authentication.");
}
 
if (certFingerprint != null
    && (!authPlugin.isMitMProof()
        || credential.getPassword() == null
        || credential.getPassword().isEmpty())) {
  throw context.getExceptionFactory().create("Cannot use cleartext authentication over unverified self-signed certificates.");
}

By verifying certFingerprint != null and checking if authPlugin.isMitMProof() is false, the patched connector prevents the serialization of sensitive credentials over an unverified TLS connection. If a self-signed certificate is in use, the handshake terminates immediately, thwarting credential leakage.

Exploit Mechanics

Exploitation of CVE-2026-55856 is achieved by configuring a malicious rogue MySQL/MariaDB server or intercepting the connection as an active proxy. The targeted application must be configured to connect with sslMode=verify-ca or sslMode=verify-full without explicitly providing trust store certificates, enabling the ephemeral fallback behavior.

The rogue server completes the TLS handshake using an arbitrary self-signed certificate, which the client accepts into its temporary storage. Following the TLS negotiation, the rogue server sends an initial protocol frame that declares mysql_clear_password as the initial authentication plugin.

Upon receiving this frame, the vulnerable client constructs a HandshakeResponse and immediately writes the plaintext database password to the TCP socket. The rogue server receives and extracts this password. Once the password is captured, the rogue server terminates the connection, completing the credential theft.

Impact Assessment

The security impact of this flaw is classified as a complete confidentiality compromise of database credentials. Because database passwords frequently grant administrative access to backend database resources, an attacker who obtains this password can compromise database confidentiality, integrity, and availability.

The CVSS v3.1 score is evaluated at 5.9 (Medium), reflecting the high complexity required to execute the attack. The adversary must possess active network positioning to conduct a Man-in-the-Middle attack or redirect the application network configuration to a rogue endpoint.

While the vulnerability exposes critical credentials, it does not directly enable remote code execution or data modification on the client system itself. Its primary threat is as an access vector to downstream database infrastructure. There is currently no evidence of active exploitation in the wild.

Remediation and Mitigation Guidance

The primary remediation for this vulnerability is upgrading the MariaDB Connector/J library to a patched release. Maintainers have released fixes across multiple versions of the library, including stable and legacy branches.

For applications built on the 3.5.x branch, upgrade to 3.5.9 or later. For applications built on 3.4.x, upgrade to 3.4.3. Applications on 3.3.x require 3.3.5, while 2.7.x deployments require upgrading to 2.7.14.

To mitigate the risk of credential leakage without immediately upgrading, administrators must eliminate trust fallback states. This is achieved by explicitly defining trusted certificates. Applications should set the serverSslCert parameter in their JDBC URL to point to a specific trusted certificate, or supply a dedicated Java TrustStore via trustStore and trustStorePassword parameters, disabling the insecure system fallback logic.

Official Patches

MariaDBBackported patch in StandardClient.java
MariaDBMain line patch using AuthenticationPluginLoader wrapper

Fix Analysis (2)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected Systems

MariaDB Connector/J Java driver

Affected Versions Detail

Product
Affected Versions
Fixed Version
MariaDB Connector/J
MariaDB
< 2.7.142.7.14
MariaDB Connector/J
MariaDB
>= 3.3.0, < 3.3.53.3.5
MariaDB Connector/J
MariaDB
>= 3.4.0, < 3.4.33.4.3
MariaDB Connector/J
MariaDB
>= 3.5.0, < 3.5.93.5.9
AttributeDetail
CWE IDCWE-522
Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
CVSS v3.1 Score5.9 (Medium)
Exploit StatusProof of Concept
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1557Adversary-in-the-Middle
Credential Access
T1040Network Sniffing
Credential Access
CWE-522
Insufficiently Protected Credentials

The product transmits sensitive credentials over an unverified TLS channel before validating the identity of the remote host.

Known Exploits & Detection

MariaDB GitHub Security AdvisoryContains regression test code to reproduce client credential leakage using a mock rogue server

Vulnerability Timeline

Vulnerability reported on HackerOne
2026-06-03
Maintainers complete root cause analysis and develop test harness
2026-06-06
Patches backported and merged
2026-06-09
Official public disclosure and CVE assignment
2026-08-28

References & Sources

  • [1]NVD CVE-2026-55856
  • [2]GitHub Advisory GHSA-g9jj-cgmh-9f38
  • [3]MariaDB Jira Tracking Ticket CONJ-1325

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•13 minutes ago•CVE-2026-55848
8.6

CVE-2026-55848: GML Layer XML External Entity (XXE) Injection in MapFish Print

An XML External Entity (XXE) vulnerability in MapFish Print allows unauthenticated remote attackers to perform arbitrary local file disclosure and Server-Side Request Forgery (SSRF) by exploiting GML layer URL parameters in requests submitted to the /api/print3/print endpoint.

Amit Schendel
Amit Schendel
0 views•7 min read
•about 1 hour ago•CVE-2026-55843
7.0

CVE-2026-55843: Privilege Demotion and Access Control Bypass via Parameter Omission in Snipe-IT

A comprehensive technical analysis of CVE-2026-55843, an Improper Privilege Management vulnerability (CWE-269) in Snipe-IT versions prior to 8.6.0. The vulnerability allows an authenticated editor or administrator to overwrite and strip the granular or administrative permissions of other users by omitting the permission parameter from profile update payloads. This issue has been resolved in Snipe-IT version 8.6.0.

Amit Schendel
Amit Schendel
2 views•7 min read
•about 3 hours ago•CVE-2026-55857
5.9

CVE-2026-55857: Insecure Credential Transmission via PAM Dialog Plugin in MariaDB Connector/J

A transport-security omission in the MariaDB Connector/J driver allows remote on-path adversaries or rogue database servers to capture database credentials in cleartext. Under default configurations (sslMode=DISABLE), the driver fails to enforce encrypted channels when negotiating the Pluggable Authentication Module (PAM) 'dialog' plugin, resulting in cleartext transmission of sensitive passwords.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•CVE-2026-55858
5.9

CVE-2026-55858: Client/Server Charset-Confusion SQL Injection in MariaDB Connector/J

CVE-2026-55858 describes a critical encoding desynchronization vulnerability in MariaDB Connector/J (the official JDBC driver). The vulnerability stems from a mismatch between the driver's static UTF-8 client-side escaping logic and dynamic character set changes initiated on the database server. When the server character set is switched mid-session to an encoding that permits ASCII-overlapping multibyte characters (such as GBK or Big5), an attacker can supply crafted inputs to swallow escaping backslashes, resulting in SQL injection and unauthorized statement execution.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 5 hours ago•CVE-2026-55859
5.9

CVE-2026-55859: Client-Server Charset Confusion in MariaDB Connector/R2DBC leading to SQL Injection

An input validation and encoding desynchronization vulnerability exists in MariaDB Connector/R2DBC versions prior to 1.4.1. The driver assumes all communication utilizes the UTF-8 character set, but fails to account for server-driven mid-session changes to the character_set_client variable. When a change to a multi-byte character set such as GBK or Big5 is induced, the server interprets client-escaped single quotes as part of a multi-byte character. This state desynchronization bypasses standard escaping mechanisms and allows remote unauthenticated attackers to execute arbitrary SQL commands.

Alon Barad
Alon Barad
6 views•5 min read
•about 6 hours ago•CVE-2026-55860
5.9

CVE-2026-55860: Cleartext Password Disclosure in MariaDB Connector/R2DBC

A security vulnerability in the MariaDB Connector/R2DBC client driver allows credential theft during the database authentication phase. The client driver does not gate clear-text password authentication plugins on transport encryption, making it possible for on-path attackers or hostile database servers to intercept passwords.

Amit Schendel
Amit Schendel
5 views•5 min read