Aug 29, 2026·6 min read·1 visit
The MariaDB Connector for Node.js fails to verify TLS or local transport security before performing PAM dialog authentication, allowing on-path attackers to capture database passwords in cleartext.
CVE-2026-55854 identifies a critical security flaw in the MariaDB Connector for Node.js (mariadb npm package). When establishing connections, the driver fails to validate transport security requirements during Pluggable Authentication Modules (PAM) dialog authentication. This vulnerability allows active on-path attackers or malicious database servers to coerce the client driver into transmitting user credentials in cleartext over unencrypted TCP connections.
The MariaDB Connector for Node.js (mariadb npm package) is a high-performance client library designed for enterprise-grade applications. It implements the MySQL/MariaDB protocol handshake to manage sessions, handle connections, and execute operations. The driver exposes a wide attack surface during the handshake sequence because it supports multiple authentication plugins, including Pluggable Authentication Modules (PAM) through the dialog plugin.
The vulnerability is classified under CWE-319 (Cleartext Transmission of Sensitive Information) and CWE-522 (Insufficiently Protected Credentials). In vulnerable versions, the client-side implementation of the dialog protocol lacks the validation checks required to block the execution of cleartext credential exchanges over unencrypted TCP networks. This oversight allows an attacker to intercept database credentials during connection negotiation.
Under default driver configurations where SSL is disabled or unconfigured, the connection establishes over raw TCP. If a client attempts to connect to a server under these conditions, a threat actor in an active network interception position can inject a spoofed authentication command. Because the client does not check the status of transport encryption before replying to the PAM dialogue, it readily leaks the raw database password.
The underlying flaw resides within the authentication subsystem of the driver, specifically in the interaction between lib/cmd/handshake/auth/pam-password-auth.js and the main dispatching class lib/cmd/handshake/authentication.js. The database driver utilizes an object-oriented architecture where distinct authentication plugins inherit behavior from a base abstract class named PluginAuth located in lib/cmd/handshake/auth/plugin-auth.js.
The base class PluginAuth exposes a method named requireSsl(), which by default returns false. This design pattern requires child authentication handlers that transmit secrets in the clear to explicitly override requireSsl() and return true to mandate transport-layer encryption. For example, the handler for standard unencrypted authentication, ClearPasswordAuth (mysql_clear_password), correctly implemented this override.
However, the PAM dialogue implementation, represented by PamPasswordAuth, failed to override the default requireSsl() return value. Because it inherited the default false value, the central dispatch router in authentication.js assumed that the PAM dialog flow could be securely executed over any channel, including raw TCP. Consequently, when the database server requested a switch to the dialog plugin, the driver proceeded with the interactive plain-text credential exchange without validating the presence of a TLS connection or a local Unix socket.
The vulnerability was mitigated by renaming the base method requireSsl() to requireSecure() to incorporate both TLS tunnels and local Unix sockets into the trusted category, and overriding it within the PamPasswordAuth plugin class.
In the patched version of lib/cmd/handshake/auth/pam-password-auth.js, the explicit override was introduced:
// Inside PamPasswordAuth
requireSecure() {
// PAM (dialog) transmits the password in clear text, so only run it over a secure channel.
return true;
}Additionally, the base class PluginAuth in lib/cmd/handshake/auth/plugin-auth.js was modified to define the fallback and evaluate transport security properties:
requireSecure() {
return false;
}
isSecureConnection(opts) {
// A connection is secure if SSL is enabled or it utilizes a local Unix socket on non-Windows systems
return Boolean(opts.ssl) || (Boolean(opts.socketPath) && process.platform !== 'win32');
}In lib/cmd/handshake/authentication.js, the driver intercepts authentication switch commands. The fix introduces a validation gate before initiating any plugin handshake:
if (this.plugin.requireSecure() && !this.plugin.isSecureConnection(opts)) {
return this.throwNewError(
`${pluginName} authentication requires TLS or a local socket`,
true,
info,
'08S01',
Errors.ER_CLEAR_PASSWORD_WITHOUT_SSL
);
}
this.plugin.start(out, opts, info);This defensive logic effectively terminates the connection and throws an error if a cleartext plugin is invoked over an unencrypted network connection, preventing the password from escaping the application boundary.
Exploiting this vulnerability requires the attacker to occupy an active Adversary-in-the-Middle (MITM) position or control a rogue database server that the victim application attempts to reach. The attack sequence operates purely at the protocol level without requiring prior database authentication.
First, the victim application initiates a connection to what it believes is the target database server. The adversary intercepts the TCP socket and returns a standard Initial Handshake packet containing dummy capabilities.
Second, after the client sends its initial handshake response, the attacker sends an Authentication Switch Request (0xFE) packet. The payload of this packet explicitly specifies the plugin name dialog (representing PAM authentication).
Third, upon receiving the switch request, the vulnerable client driver checks its plugin mapping and instantiates PamPasswordAuth. Because requireSecure() evaluates to false in affected versions, the driver ignores the absence of TLS. It prompts the internal system password buffer, writes the cleartext password into a network packet, and transmits it back to the intercepting adversary, exposing the credentials.
The successful exploitation of CVE-2026-55854 results in complete confidentiality compromise for the affected database account. The attacker obtains the plain-text password used by the client application to connect to the database.
Since Node.js backends often connect to MariaDB instances using high-privilege administrative service accounts (such as root or dedicated application schemas), compromised credentials can lead to unauthorized data extraction, database tampering, or complete database takeover.
Despite the severity of a cleartext credential leak, the CVSS base score is capped at 5.9 (Medium) because of the elevated attack complexity (AC:H). The attacker must either compromise local routing (via ARP spoofing or DNS hijacking) or control a server to which the client application actively attempts to connect, limiting the vector of immediate remote exploitation without network-level access.
Primary remediation requires upgrading the mariadb npm dependency to a patched version. Maintainers released fixed versions across all major release branches: 3.2.4, 3.3.3, 3.4.6, and 3.5.3.
For environments unable to immediately apply updates, the vulnerability can be mitigated by configuring strict, verified TLS connections. Developers must ensure that connections are explicitly denied if TLS fails or if a certificate is invalid. Passing rejectUnauthorized: true inside the connection settings prevents transport-layer interception:
const mariadb = require('mariadb');
const pool = mariadb.createPool({
host: 'db.example.com',
user: 'pam_user',
password: 'secure_password',
ssl: {
ca: fs.readFileSync('/path/to/ca-cert.pem'),
rejectUnauthorized: true
}
});For microservice environments running on the same hardware, connection over local Unix domain sockets bypassing TCP entirely should be configured, as Unix sockets are intrinsically validated as secure channels by the patched driver:
const pool = mariadb.createPool({
socketPath: '/var/run/mysqld/mysqld.sock',
user: 'pam_user',
password: 'secure_password'
});CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
mariadb MariaDB | < 3.2.4 | 3.2.4 |
mariadb MariaDB | >= 3.3.0, < 3.3.3 | 3.3.3 |
mariadb MariaDB | >= 3.4.0, < 3.4.6 | 3.4.6 |
mariadb MariaDB | >= 3.5.0, < 3.5.3 | 3.5.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-319, CWE-522 |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 Score | 5.9 (Medium) |
| EPSS Score | 0.00278 |
| Impact | High Confidentiality Compromise (Credential Disclosure) |
| Exploit Status | Proof-of-Concept |
| CISA KEV Status | Not Listed |
Credentials are sent over unencrypted TCP connections.
An integer overflow vulnerability (CWE-190) exists in klever-go, the Go implementation of the Klever blockchain protocol, within the Semi-Fungible Token (SFT) addition path. An attacker with a mint role can exploit this by passing an extremely large positive value when adding SFT quantity, which overflows a signed 64-bit integer. This bypasses the maximum supply checks and allows minting arbitrary tokens while corrupting the state.
A high-severity log evasion and tampering vulnerability in Graylog's FortiGate key-value syslog parser allows unauthenticated remote attackers to modify, delete, or overwrite critical security log fields, potentially bypassing security controls and monitoring systems.
An Insecure Direct Object Reference (IDOR) vulnerability exists within the access-token revocation endpoint of Graylog. Authenticated users can exploit this flaw to delete access tokens belonging to other users, including high-privileged administrator accounts, thereby disrupting active integrations and API access.
An improper authorization vulnerability in SeaweedFS versions 4.08 through 4.33 allows authenticated, low-privileged users to bypass directory isolation and perform unauthorized metadata operations within S3Tables and Iceberg REST interfaces. The vulnerability arises from an automatic collapse of account-less static identities to the default administrative principal, combined with a fail-open default policy configuration and self-referential authorization parameters in the table bucket listing routines. Together, these logical flaws expose administrative configurations and namespace architectures to unprivileged actors. The issue is resolved in version 4.34 by enforcing capability-based access checks, isolating fallback modes, and performing granular access verification on target buckets.
A critical path traversal vulnerability (CVE-2026-55874) in the SeaweedFS S3 API Gateway prior to version 4.34 allows authenticated remote attackers with write access to at least one bucket to bypass isolation. By supplying crafted directory traversal sequences in the X-Amz-Copy-Source header, an attacker can read objects from arbitrary buckets on the same deployment.
A Stored Cross-Site Scripting (XSS) vulnerability exists in the silverstripe/versioned package prior to version 3.2.1. When an administrator restores an archived page containing a crafted Title or URLSegment, the generated restoration message is rendered as CAST_HTML without proper sanitization. This allows malicious JavaScript to execute in the administrator's browser session, compromising the confidentiality and integrity of the CMS dashboard.