GHSA-cx2f-j9fh-8g68: Medium severity npm/mariadb vulnerability

Published Oct 8, 2026
·
Updated

Description On the zero-configuration TLS path, the connector accepts a self-signed server certificate at the TLS level and then validates the server's identity from the fingerprint hash the server appends to the final OKPacket (Authentication.validateFingerPrint). That validation calls hash() on the authentication plugin in use to obtain the password-derived secret both sides combine with the seed and the certificate fingerprint.

Ed25519PasswordAuth.hash() referenced an identifier seed that was not in scope: it was neither a parameter of the method nor a module-scope binding, existing only as a parameter of the unrelated static encryptPassword(password, seed). Invoking the method therefore threw ReferenceError: seed is not defined.

The throw happens synchronously inside the socket data handler, and no frame between PacketInputStream.onData() and the plugin guards it, so the error escapes as an uncaught exception rather than surfacing as a connection error.

Because the fingerprint hash is what a legitimate MariaDB server sends on this path, ed25519 authentication with zero-configuration TLS never completed successfully — the failure is not limited to a hostile server.

Impact Denial of service against the client process. Under Node's default uncaughtException behaviour the process exits, so a long-running service is terminated rather than seeing a failed connection attempt. No credential is disclosed and no data is altered; the impact is availability only.

An unauthenticated attacker able to intercept the connection (a MitM presenting a self-signed certificate, or a compromised server) can trigger the crash at will, since the self-signed-certificate path is precisely what such an attacker exercises and the rogue server only has to answer the ed25519 challenge with an OKPacket carrying a 0x01-prefixed validation hash.

Exposure requires all of the following: a MariaDB server reached over TCP (not a unix socket), ssl: true or an ssl object without rejectUnauthorized: false, a password set, no ssl.ca provided, and cliented25519 as the negotiated authentication plugin. Other authentication plugins are unaffected, as is any configuration where the server certificate is verified against a provided CA.

Resolution Ed25519PasswordAuth.hash() now returns the Ed25519 public key derived from the password scalar, which is the value the server combines into the fingerprint hash, and the derivation is covered by unit and integration tests.

Fixed in 3.5.4. The 3.3.x and 3.4.x maintenance branches are not patched; upgrade to 3.5.4 or later.

Workarounds Provide the server certificate to the client (ssl: { ca: ... }) so standard certificate validation is used instead of fingerprint validation, or set ssl: { rejectUnauthorized: false } to opt into trust mode, or use an authentication plugin other than cliented25519, until upgraded.

Credit Reported by fg0x0.

Affected Software

1 affected componentFixes available
npm/mariadb>=3.3.0<3.5.4
3.5.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/mariadb to a version that resolves this vulnerability.

    Fixed in 3.5.4
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.5.4
  3. Configuration

    Provide the server certificate to the client using the ssl.ca configuration so standard certificate validation is used instead of fingerprint validation.

    MariaDB client TLS configuration ssl.ca = server certificate
  4. Configuration

    Set ssl: { rejectUnauthorized: false } to opt into trust mode until upgraded.

    MariaDB client TLS configuration ssl.rejectUnauthorized = false
  5. Configuration

    Use an authentication plugin other than client_ed25519 until upgraded.

    MariaDB authentication configuration authentication plugin = other than client_ed25519

Event History

Oct 8, 2026
Advisory Published
via GitHub·07:42 PM
Data Sourced
via GitHub·07:42 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this failure?

The issue applies when the npm/mariadb connector uses the zero-configuration TLS path together with Ed25519 password authentication. A legitimate MariaDB server sending the expected fingerprint hash can trigger it; a hostile server is not required.

2

What does the failure look like in an affected application?

Authentication does not complete successfully. The connector throws an uncaught "ReferenceError: seed is not defined" synchronously from its socket data handler rather than reporting a normal connection error.

3

Does this affect every TLS configuration?

The provided information specifically identifies the zero-configuration TLS path. It does not establish that TLS configurations outside that path are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203