CVE-2026-138405 in psqlODBCinfo

Summary

by MITRE • 11/29/2026

Before psqlODBC writes a connection string to its debug log, it masks the password. It masked only a keyword written exactly as PWD or Password. A password given under " PWD", "PWD ", "Passwd" or "sslpassword" went into the log unmasked. The log line for each keyword also showed the value of any keyword the driver does not recognise, so a password under a misspelled keyword was logged as well.

A masked secret was replaced one character at a time, so the log showed the length of the password, and of each secret in pqopt.

CVE-2026-136504 covers two other ways the password reached the log: the setup dialog's Test button and the Unicode connect functions logged the connection string before it was masked. That is fixed in 18.00.0007. The faults described here are in the masking itself, and they remain in 18.00.0007.

The debug log is off by default, and only an administrator turns it on with the Debug setting. Only someone who later reads the log sees the password, which in practice means a log attached to a bug report or sent to support.

Versions up to and including psqlODBC 18.00.0007 are affected.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/29/2026

The vulnerability identified as CVE-2026-136504 represents a critical information disclosure flaw within the PostgreSQL ODBC driver, specifically affecting versions up through 18.00.0007. This issue stems from an insufficient masking implementation in the debug logging mechanism used by psqlODBC to record connection parameters. While the developer intended to protect sensitive credentials by obscuring passwords before writing them to log files, the logic governing this obfuscation is flawed due to rigid string matching and incomplete coverage of valid configuration keys. The core technical failure lies in the driver's reliance on exact case-sensitive matches for specific keywords such as PWD or Password when determining which values require masking. Consequently, any password provided under alternative but functionally equivalent connection string parameters remains exposed in plaintext within the debug logs.

The operational impact of this flaw is significant because it allows attackers with access to log files to recover database credentials that were presumed secure by the application's design. The vulnerability manifests when a user specifies their password using variations such as PWD with leading or trailing whitespace, Passwd instead of Password, or sslpassword for SSL-encrypted connections. Additionally, if a typo occurs in any keyword name, resulting in an unrecognized parameter key, the driver inadvertently logs the value associated with that unknown key without applying any masking routine. This behavior effectively bypasses the security control intended to protect authentication secrets during troubleshooting and diagnostic processes.

Beyond simple exposure of plaintext credentials, the implementation introduces additional risks related to information leakage through side channels. The masking algorithm employed by psqlODBC replaces each character of a secret with an asterisk one at a time rather than replacing the entire string uniformly or using a consistent placeholder length. This approach inadvertently reveals the exact length of the password and any other secrets stored in pqopt variables. Knowledge of credential length can assist attackers in narrowing down brute-force attack spaces or validating guessed passwords against known complexity policies, thereby reducing the effort required to compromise an account even if the full string is not immediately visible.

The severity of this vulnerability is contextualized by its dependency on specific environmental conditions and user actions. By default, debug logging is disabled within psqlODBC, meaning that under normal operational circumstances, these logs are never generated or written to disk. The risk materializes only when a system administrator explicitly enables the Debug setting to troubleshoot connectivity issues. Furthermore, exploitation requires access to the resulting log files, which typically occurs if an attacker gains read access to the server hosting the ODBC driver or if the logs are inadvertently shared with external support personnel or included in public bug reports without sanitization. This aligns with CWE-532, which classifies this issue as information exposure through log files, and maps to MITRE ATT&CK technique T1078, specifically regarding valid accounts being used for unauthorized access after credentials are harvested from system logs.

To mitigate the risks associated with CVE-2026-136504, organizations should ensure that debug logging is disabled in production environments unless actively required for troubleshooting by authorized personnel. When debugging is necessary, it is imperative to review and sanitize log outputs before sharing them externally or storing them in accessible locations. Administrators must be educated on the limitations of the current masking implementation and advised to avoid using alternative password keywords such as Passwd or sslpassword if possible, although relying solely on user discipline is insufficient for robust security. The recommended long-term solution involves upgrading to a patched version of psqlODBC where these specific masking flaws are addressed, ensuring that all potential connection string parameters containing sensitive data are uniformly obscured regardless of keyword variation or whitespace presence. Until such an update is available, strict access controls on log directories and regular auditing of log contents for accidental credential exposure should be enforced as compensating controls.

Responsible

PostgreSQL

Reservation

11/29/2026

Disclosure

11/29/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!