CVE-2026-135897 in Rust Driverinfo

Summary

by MITRE • 11/25/2026

The MongoDB Rust driver's connection-string parser can include database password text and authentication property values in the error messages it returns when a connection string is malformed. The optional error-redaction feature does not fully remove this text. A party with read access to the application's logs or error output may obtain part or all of a database credential.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/25/2026

The MongoDB Rust driver contains an information disclosure vulnerability within its connection-string parsing logic, specifically affecting how malformed inputs are handled during authentication attempts. When a user provides a connection string that fails validation due to syntax errors or invalid formatting, the driver generates error messages intended to help developers debug the issue. However, these error messages inadvertently include sensitive data embedded in the input, such as database passwords and specific authentication property values. This behavior occurs because the parser does not sufficiently sanitize the output before returning it to the application layer for logging or display purposes.

The core technical flaw lies in the incomplete implementation of the optional error-redaction feature designed to protect credentials. While the driver attempts to mask sensitive information, the redaction logic fails to cover all code paths where malformed connection strings are processed. Consequently, if a connection string contains an invalid format but includes valid-looking credential structures, those credentials may be echoed back in plain text within the resulting exception or error log entry. This represents a classic case of improper input validation leading to sensitive data exposure, aligning with CWE-209 which describes the generation of error messages containing sensitive information that could aid attackers in further attacks.

The operational impact of this vulnerability is significant for applications relying on structured logging or external monitoring systems. An attacker who gains read access to application logs, standard error output, or crash dumps can extract partial or complete database credentials from these records. This exposure compromises the confidentiality and integrity of the associated MongoDB instance. Since authentication credentials are often reused across environments or services, obtaining them allows for unauthorized data access, potential data exfiltration, or lateral movement within a network infrastructure. The risk is heightened in production environments where log retention policies may keep historical error messages accessible for extended periods.

To mitigate this vulnerability, developers should ensure they are using the latest version of the MongoDB Rust driver where this redaction logic has been corrected to fully scrub credentials from all error outputs regardless of input format. Additionally, application-level defenses such as centralized logging agents that filter or mask sensitive patterns before storage can provide an additional layer of protection. It is also critical to audit existing log files for any previously exposed credentials and rotate those passwords immediately if exposure is suspected. Adhering to the principle of least privilege by using separate database users with minimal permissions for application connections further reduces the blast radius should such information be compromised, aligning with ATT&CK technique T1078 which involves valid accounts being used for unauthorized access.

Responsible

Mongodb

Reservation

11/24/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00282

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!