ZeroHour

CVE-2026-55215

moderate

Credentials Sent Before TLS Validation in MariaDB Connector/Node.js

CVSS 3.1
7.5 high
EPSS
<1%p36
Published
()
Modified
AI analysis

MariaDB Connector/Node.js, the official Node.js client for connecting applications to MariaDB and MySQL databases, sends the database password before it has finished validating the server's TLS certificate when ssl is enabled without a pinned CA or server certificate. A bug in the handshake authentication-switch logic can cause the mysql_clear_password plugin to be used for the initial exchange, transmitting the password before the post-TLS identity check. An active man-in-the-middle can present a self-signed certificate, capture the password, and then authenticate to the database directly with it, even though the connector subsequently rejects the server and closes the connection. Only applications running affected connector versions (prior to 3.3.3, 3.4.6, or 3.5.3) that enable ssl without pinning a CA or server certificate are exposed. No public exploit, KEV listing, or confirmed in-the-wild exploitation is known; EPSS currently estimates a 0.4% probability of exploitation within 30 days.

What to do: Upgrade MariaDB Connector/Node.js to 3.3.3, 3.4.6, or 3.5.3, matching your current 3.x maintenance branch. As an interim mitigation, pin the CA or server certificate in the connector's ssl options instead of enabling ssl without a pinned certificate, which prevents credentials from being sent before the server is validated. Review database authentication logs for unexpected successful logins, since any prior on-path attacker could have captured and reused database credentials.

Affected
MariaDB Connector/Node.jsversions prior to 3.3.3, 3.4.6, and 3.5.3 (fixed in 3.3.3, 3.4.6, and 3.5.3)
Estimated exposure
moderate≈10k–100k Node.js applications (the mariadb npm package draws hundreds of thousands of weekly downloads, but only deployments enabling ssl without a pinned CA… — Based on the mariadb npm package's order-of-hundreds-of-thousands of weekly downloads narrowed to the subset that enables ssl without pinning a CA or server certificate, since pinned configurations are not affected per the advisory.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. Prior to versions 3.3.3, 3.4.6, and 3.5.3, when ssl is enabled without a pinned CA or server certificate, MariaDB Connector/Node.js sends credentials before completing certificate fingerprint validation. In lib/cmd/handshake/auth/handshake.js, a server that selects mysql_clear_password as the initial authentication plugin can receive the password before the post-TLS identity check. In lib/cmd/handshake/authentication.js, an authentication switch can evaluate the previous plugin instead of the requested target plugin, allowing mysql_clear_password to send the credential first. An active man-in-the-middle can present a self-signed certificate, capture the database password, and use it to authenticate directly even though the connector later rejects the server and closes the connection. This issue is fixed in versions 3.3.3, 3.4.6, and 3.5.3.

Weakness
CWE-295, CWE-522
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

In the news

No ingested article mentions this CVE yet.