GHSA-473q-m89c-ghf8: MySqlConnector: Account password disclosed to a man-in-the-middle in zero-configuration TLS mode (clear-text password sent before certificate is verified)
MySqlConnector, the .NET MySQL/MariaDB driver on NuGet, can send a clear-text password to a man-in-the-middle before the server certificate is checked. It happens with SslMode=VerifyCA or VerifyFull, no SslCa option and a non-empty password. Versions before 2.6.1 are affected. Upgrade to 2.6.1.
Published Oct 28, 2026 · Analysis Nov 1, 2026
What an attacker can do
With VerifyCA or VerifyFull and no SslCa, the driver accepts a self-signed certificate at first. It then checks a fingerprint derived from the password, as MariaDB zero-configuration TLS expects. That check runs too late for the clear-text case.
An attacker who can sit between the client and the database runs a MySQL proxy with any self-signed certificate. The proxy completes the TLS handshake and asks for a clear-text scheme: mysql_clear_password, or the clear-text fallback of caching_sha2_password or sha256_password. The client sends the password, and only then does the fingerprint check reject the connection.
The attacker gets the plaintext database password. That defeats the protection VerifyFull is meant to give. The attacker needs a network position on the path to the database. Clients with an empty password, a configured SslCa, CA-validated TLS, or a Unix socket or loopback connection are not exposed. SslMode Preferred and Required are out of scope, since they never authenticate the server.
Who is affected
Affected: MySqlConnector below 2.6.1, when the connection string uses SslMode=VerifyCA or VerifyFull, has no SslCa option, and uses a non-empty password. This is typical for MariaDB servers that rely on zero-configuration TLS. Check the installed version:
dotnet list package | grep MySqlConnectorAlso search your connection strings for SslMode and SslCa.
MySqlConnector
- Ecosystem
- NuGet
- Affected
- < 2.6.1
- Fixed in
- 2.6.1
- Check
dotnet list package --include-transitive
How to fix it
Upgrade MySqlConnector to 2.6.1.
dotnet add package MySqlConnector --version 2.6.1The fix adds a check before any clear-text password is sent. The server identity must be verified: a Unix socket, a loopback connection, or TLS with no certificate policy errors. Otherwise the driver throws a MySqlException. If you cannot upgrade, the advisory gives these workarounds: set SslCa with VerifyCA or VerifyFull, use a local or Unix-socket connection, or avoid clear-text authentication. Rotate any password that may have crossed an untrusted network.
How to tell if you were hit
The driver leaves no log line for the leak itself. Review which clients connect with VerifyCA or VerifyFull and no SslCa, and which cross untrusted networks. On the database server, look for logins from unexpected hosts using a password you believe only your apps hold. Look for unexpected proxies or ARP and DNS changes on the path to the database. After upgrading, a client that cannot verify the server fails with a MySqlException about a verified server certificate. Treat that as a sign of a misconfigured or intercepted connection.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
With SslMode set to VerifyCA or VerifyFull with no configured CA certificate, an unvalidated TLS connection is treated as secure and a clear-text password can be sent before the certificate is checked. This can occur when relying on the password to validate a self-signed cert, e.g., MariaDB's zero-configuration TLS.
Impact
An attacker who can deploy a man-in-the-middle MySQL proxy presenting any self-signed certificate can capture the plaintext database password of a client that:
- uses
SslMode = VerifyCAorVerifyFull, and - does not use the
SslCaconnection string option, and - uses a non-empty password.
The attacker completes the TLS handshake with its own cert, requests a clear-text password authentication scheme (mysql_clear_password, or forces the caching_sha2_password/sha256_password clear-text fallback), and receives the password before the fingerprint check rejects the connection, defeating the man-in-the-middle protection VerifyFull is expected to provide.
Not affected: a configured CA (SslCa), CA-validated TLS, local connections (Unix socket / loopback), or empty passwords. Using SslMode set to Preferred or Required is out of scope (this is documented as not authenticating the server).
Workarounds
Provide SslCa with VerifyCA/VerifyFull, use a local/Unix-socket connection, or avoid clear-text authentication.
References
- https://mariadb.org/mission-impossible-zero-configuration-ssl/
Credited to rusher.
Questions
- Is MySqlConnector affected if I use SslMode=Required?
This advisory does not cover Preferred or Required. They are documented as not authenticating the server. Use VerifyCA or VerifyFull with SslCa if you need protection from a man-in-the-middle.
- Which MySqlConnector version fixes GHSA-473q-m89c-ghf8?
Version 2.6.1. Versions below 2.6.1 are affected. The 2.6.1 release notes list the fix as MitM password disclosure in zero-configuration TLS mode.
- Are local connections at risk?
No. Unix socket and loopback connections are not affected, and neither are empty passwords or connections where a configured CA validates the certificate.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
