CVE-2026-138405

Debug log records the database password under several spellings of the keyword, and the length of masked passwords

Published Nov 29, 2026 CVSS 3.1 · 5 Medium EPSS n/a KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The psqlODBC driver writes connection strings to a debug log before attempting to mask the password. The masking logic only redirects exact matches of the keywords "PWD" or "Password", leaving variants such as " PWD", "PWD ", "Passwd", "sslpassword", or any misspelled keyword visible in the log. In addition, the algorithm replaces each secret character one at a time, revealing the length of the password and the number of other secrets present. Unrecognized keywords are also recorded in full, so any custom keyword that contains a password will appear unmasked. Consequently, anyone who can read the log file can recover the database password or at least determine its length.

Affected Systems

Affected installations are those using the PostgreSQL psqlODBC ODBC driver up to and including version 18.00.0007. The flaw resides in the masking routine and is present in all releases through that version; newer releases beyond 18.00.0007 are not affected.

Risk and Exploitability

The CVSS base score is 5, indicating a moderate severity, while the EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, suggesting no confirmed exploitation. The attack vector relies on an administrator enabling the debug setting; an attacker would need access to the debug log, typically restricted to privileged users or obtained through support or bug‑report channels. No further steps are required beyond reading the log.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the psqlODBC driver to the latest release that addresses the password‑masking issue.
  • Disable the debug logging feature or limit its activation to trusted administrators to prevent credentials from being written to the log in the first place.
  • Apply strict file permissions so that only privileged users can read the debug log, thereby reducing the risk of accidental credential disclosure.
  • If an immediate upgrade is not possible, avoid using unrecognized or misspelled password keywords in connection strings; rely solely on the exact, recognized keyword "Password" so that the password is properly masked.

Generated by OpenCVE AI on November 29, 2026 at 20:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Postgresql
Postgresql psqlodbc
Vendors & Products Postgresql
Postgresql psqlodbc
Type Values Removed Values Added
Description 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.
Title Debug log records the database password under several spellings of the keyword, and the length of masked passwords
Weaknesses CWE-532
References
Metrics cvssV3_1

{'score': 5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N'}

Weaknesses
  • CWE-532

    Insertion of Sensitive Information into Log File

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Nov 29, 2026, 6:01 PM
Reserved
Nov 29, 2026, 4:10 PM
Status
Received
Published
Nov 29, 2026, 7:17 PM
Modified
Nov 29, 2026, 7:17 PM