CVE-2026-107382: Mariadb Uncaught Exception Crashes The Client Vulnerability

MODERATE
Advisory Identifier: GHSA-cx2f-j9fh-8g68
CVSS 5.9
CWE-248
Published
Advisory Summary

CVE-2026-107382 is a MODERATE (CVSS 5.9) uncaught exception crashes the client vulnerability (CWE-248: Uncaught Exception) affecting Mariadb libraries in the npm ecosystem. The issue involves uncaught exception crashes the client during ed25519 authentication with zero-configuration tls. Remediation is available by upgrading affected packages to version 3.5.4.

CVE-2026-107382 at a Glance

CVE Identifier CVE-2026-107382
GHSA Identifier GHSA-cx2f-j9fh-8g68
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-248: Uncaught Exception
Affected Product Mariadb
Package Ecosystem npm
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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-107382

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

mariadb fixed: 3.5.4
npm install mariadb@3.5.4
Verify Direct and Transitive Dependencies

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

npm ls mariadb

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-107382, inspect your project dependencies using npm:

npm ls mariadb

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

Note: The npm ls mariadb command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Mariadb, 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

### 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 OK_Packet (`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 OK_Packet 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 `client_ed25519` 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 `client_ed25519`, until upgraded. ### Credit Reported by fg0x0.

CVE-2026-107382 Affected Mariadb Versions

1 component(s)
Fixed Versions:
3.5.4
Product / Package Ecosystem Affected Versions Fixed Version
mariadb
npm
≥ 3.3.0
< 3.5.4
3.5.4

References

Frequently Asked Questions

What is CVE-2026-107382?
CVE-2026-107382 is a security vulnerability in Mariadb involving Uncaught exception crashes the client during ed25519 authentication with zero-configuration TLS under CWE-248: Uncaught Exception.
Which Mariadb versions are affected?
Affected versions include releases prior to 3.5.4 across affected packages: mariadb.
What version fixes CVE-2026-107382?
Upgrading to 3.5.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mariadb affected?
Yes, mariadb is affected in releases prior to 3.5.4. Upgrade your dependency to 3.5.4 or later.
What is the CVSS score of CVE-2026-107382?
CVE-2026-107382 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:N/I:N/A:H.
What CWE is associated with CVE-2026-107382?
CVE-2026-107382 is classified under CWE-248: Uncaught Exception (An exception is thrown from a function, but it is not caught.).
How can I check npm dependencies for CVE-2026-107382?
Run the dependency tree command: 'npm ls mariadb'. 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-cx2f-j9fh-8g68",
  "modified" : "2026-10-08T19:42:04Z",
  "published" : "2026-10-08T19:42:04Z",
  "aliases" : [ "CVE-2026-107382" ],
  "summary" : "MariaDB Connector/Node.js: Uncaught exception crashes the client during ed25519 authentication with zero-configuration TLS",
  "details" : "### Description\nOn 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 OK_Packet (`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.\n\n`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`.\n\nThe 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.\n\nBecause 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.\n\n### Impact\nDenial 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.\n\nAn 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 OK_Packet carrying a `0x01`-prefixed validation hash.\n\nExposure 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 `client_ed25519` as the negotiated authentication plugin. Other authentication plugins are unaffected, as is any configuration where the server certificate is verified against a provided CA.\n\n### Resolution\n`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.\n\nFixed in 3.5.4. The 3.3.x and 3.4.x maintenance branches are not patched; upgrade to 3.5.4 or later.\n\n### Workarounds\nProvide 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 `client_ed25519`, until upgraded.\n\n### Credit\nReported by fg0x0.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mariadb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.0"
      }, {
        "fixed" : "3.5.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-nodejs/security/advisories/GHSA-cx2f-j9fh-8g68"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/784ca3d757194a05f202d84b0c762321e76a7915"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-nodejs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.5.4"
  }, {
    "type" : "WEB",
    "url" : "https://jira.mariadb.org/browse/CONJS-356"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-248" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-08T19:42:04Z",
    "nvd_published_at" : null
  }
}