CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-55854

CVE-2026-55854: Cleartext Credential Disclosure in MariaDB Connector/Node.js via Coerced Authentication Switch

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 29, 2026·6 min read·49 visits

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code Analysis and Patch Verification

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.

Exploitation Methodology

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.

Impact Assessment

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.

Remediation and Defensive Configurations

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'
});

Official Patches

MariaDBGitHub Security Advisory GHSA-42r5-vhpq-m858
MariaDBMariaDB Jira Bug Tracker CONJS-353

Fix Analysis (4)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Probability
0.28%
Top 80% most exploited

Affected Systems

MariaDB Connector/Node.js (mariadb npm package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
mariadb
MariaDB
< 3.2.43.2.4
mariadb
MariaDB
>= 3.3.0, < 3.3.33.3.3
mariadb
MariaDB
>= 3.4.0, < 3.4.63.4.6
mariadb
MariaDB
>= 3.5.0, < 3.5.33.5.3
AttributeDetail
CWE IDCWE-319, CWE-522
Attack VectorNetwork (AV:N)
CVSS v3.1 Score5.9 (Medium)
EPSS Score0.00278
ImpactHigh Confidentiality Compromise (Credential Disclosure)
Exploit StatusProof-of-Concept
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1040Network Sniffing
Credential Access
T1557Adversary-in-the-Middle
Credential Access
CWE-319
Cleartext Transmission of Sensitive Information

Credentials are sent over unencrypted TCP connections.

Vulnerability Timeline

Initial test corrections and development commits started under CONJS-353
2026-03-17
Core patch implemented validating requireSecure in handshake sequence
2026-06-08
Public disclosure of CVE-2026-55854 / GHSA-42r5-vhpq-m858
2026-08-28
Official library releases 3.2.4, 3.3.3, 3.4.6, and 3.5.3 made available
2026-08-28

References & Sources

  • [1]NVD Reference
  • [2]CVE.org Record
  • [3]GitHub Security Advisory
  • [4]MariaDB Jira Bug Tracker

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•29 minutes ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
1 views•12 min read
•about 1 hour ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
3 views•10 min read
•about 2 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 3 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 4 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 6 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.

Amit Schendel
Amit Schendel
6 views•9 min read