CVE-2026-136504 in psqlODBCinfo

Summary

by MITRE • 11/26/2026

With the driver's debug log (MyLog) turned on, two paths write the database password to the log in clear text, both beside a line where the driver's own redaction masks it as PWD=xxxxx:

- Pressing "Test" in the Windows data source setup dialog (psqlsetup.dll) logs the whole connection string, which carries PWD= percent-encoded, which is reversible, and any password= or sslpassword= inside pqopt. - The Unicode connect functions SQLDriverConnectW, SQLConnectW and SQLBrowseConnectW log their arguments as they convert them between UTF-16 and UTF-8, before the masking happens. The ANSI entry points are unaffected.

Turning the log on takes an administrator, and MyLog is off by default. The exposure is the person who later reads the log, which in practice means a log attached to a bug report or handed to support. Making that safe is the purpose of the driver's redaction, and these two sites bypassed it.

Versions up to and including psqlODBC 18.00.0006 are affected.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/26/2026

The PostgreSQL ODBC driver contains a critical information disclosure vulnerability within its debug logging mechanism that results in the exposure of plaintext database credentials under specific configuration conditions. This flaw arises from two distinct code paths where sensitive authentication data is written to log files before or outside the scope of the driver's built-in redaction logic designed to mask passwords as PWD=xxxxx. The primary risk vector involves the Windows Data Source Name (DSN) setup utility, specifically within psqlsetup.dll. When an administrator interacts with this interface and initiates a connection test by pressing the Test button, the application logs the entire connection string in clear text. Although the password component is percent-encoded within the URL structure of the connection string, this encoding scheme is trivially reversible, allowing any observer to recover the original plaintext password. Furthermore, if specific options such as password= or sslpassword= are present within the pqopt parameter block, these values are also logged in an unmasked format, compounding the exposure risk for applications relying on SSL encryption with custom authentication parameters.

A second vulnerability path exists within the Unicode variants of the ODBC API entry points: SQLDriverConnectW, SQLConnectW, and SQLBrowseConnectW. These functions log their arguments during the internal conversion process between UTF-16 and UTF-8 character encodings. This logging occurs prior to the execution of the password masking routine, meaning that any credentials passed through these Unicode interfaces are captured in plaintext within the debug logs. It is important to note that this specific flaw does not affect the ANSI entry points (SQLDriverConnectA, SQLConnectA, etc.), which do not exhibit this pre-masking logging behavior. The vulnerability is contingent upon the driver's debug log feature being explicitly enabled by a system administrator, as the MyLog setting is disabled by default in production environments. Consequently, the attack requires local administrative access to enable verbose debugging or physical/logical access to the resulting log files after they have been generated.

The operational impact of this vulnerability centers on unauthorized credential theft through passive observation rather than active exploitation. The primary threat model involves an individual who gains read access to the debug logs produced by the driver, such as a support technician reviewing a bug report attachment or an administrator auditing system logs for troubleshooting purposes. Since the redaction mechanism is intended to protect credentials in these exact scenarios, its bypass represents a significant failure of defense-in-depth principles. The exposure allows attackers with log file access to harvest valid database passwords, which can then be used to authenticate directly against the PostgreSQL server, potentially leading to full data compromise or lateral movement within the network infrastructure depending on the privileges associated with those credentials.

This vulnerability is classified under CWE-532, Information Exposure Through Log Files, as it involves the inclusion of sensitive information in log files that may be accessible to unauthorized parties. From a tactical perspective, this aligns with ATT&CK technique T1078, Valid Accounts, specifically regarding the harvesting of credentials from system logs for subsequent authentication abuse. To mitigate this risk, organizations should ensure they are running versions of psqlODBC later than 18.00.0006, where these logging flaws have been addressed. In environments where older versions must remain in use, administrators should strictly avoid enabling the MyLog debug feature unless absolutely necessary for troubleshooting and immediately disable it once diagnostics are complete. Additionally, implementing strict file permissions on log directories to restrict access to only essential system accounts can reduce the likelihood of credential exposure if logging is inadvertently enabled. Regular auditing of log content for sensitive data patterns remains a recommended best practice regardless of software version updates.

Responsible

PostgreSQL

Reservation

11/24/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00192

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!