CVE-2026-138404

Another local user can read the driver's log files or make it write into the victim's own files (incomplete fix for CVE-2026-120066)

Published Nov 29, 2026 CVSS 3.1 · 6.3 Medium EPSS < 1% KEV · Not listed
Description
With Debug or CommLog on, psqlODBC writes its log files to a shared directory under predictable names. By default that is /tmp on Unix-like systems and C:\ on Windows, and each file name holds the process ID. The logs hold SQL text, data and connection details.

On Unix-like systems, the fix for CVE-2026-120066 in 18.00.0006 made the driver refuse a symbolic link at the log path. It used an existing file only if it was a regular file owned by the user running the application. It did not check whether the file had other hard links. So another local user could create a hard link at the log path to a file the victim owns. The link passed every check, and the driver appended its log to the victim's file. A FIFO at the log path is a second case, which CVE-2026-120066 did not cover: opening it blocked the application until another process read from it.

On Windows, the fix for CVE-2026-120066 did not apply, and the driver opened the log file without any of these checks. A log file created in C:\ by a service or an elevated process got that directory's permissions, which let other local users read it. In a log directory created under C:\ with default permissions, they could also modify it. A file that another user had already created at the log path was used as it was. The MSDTC log in C:\ or C:\pgdtclog was opened the same way.

Debug and CommLog are off by default, and only an administrator turns them on.

Versions up to and including psqlODBC 18.00.0007 are affected.

Analysis

AI-generated

Technical impact

The psqlODBC driver writes SQL queries, data, and connection details to log files in a shared directory whose name is derived from the process ID. By default the directory is /tmp on Unix-like systems and C: on Windows. The driver historically accepted symbolic and hard links at the log path. The corrected version rejects symbolic links but still permits hard links and does not detect whether the target file has other hard links. Consequently another local user can create a hard link at the log path that points to a file owned by the victim, causing the driver to append its log data to that file. A FIFO (named pipe) can also be placed at the log path to stall the driver, a scenario not covered in the fix. On Windows the pre‑fix code opens the log file without any ownership or link checks, allowing a local user to read or modify logs created by an elevated service or to write into an existing file at the log path. Debug and CommLog are off by default but enable administrators to activate log creation.

Affected Systems

Affected systems are PostgreSQL clients using the psqlODBC driver, versions up to and including 18.00.0007. The flaw is present on Unix-like platforms where the driver writes to /tmp and on Windows where logs are written to C: or subdirectories such as C:pgdtclog. Debug and CommLog logging must be enabled for the vulnerability to be exploitable, a setting that is typically only turned on by administrators. Any local user who can create files, hard links, or FIFOs in the shared log directory can use this flaw to read or modify the victim’s files.

Risk and Exploitability

The CVSS score of 6.3 classifies the issue as moderate severity. EPSS information is not available and the vulnerability is not listed in the CISA KEV catalog, indicating no widely reported exploitation. However, local privilege users with access to the log directory can create hard links or FIFOs and read or tamper with the victim’s data, so the risk remains significant for systems that enable debugging or logging in the default location.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade psqlODBC to a version newer than 18.00.0007, which implements hard link and FIFO checks and enforces ownership when creating logs.
  • If an upgrade cannot be performed immediately, disable Debug and CommLog or configure the driver to write logs only to a directory owned by and accessible only to the application user, and set restrictive permissions (e.g., 700 on Unix). This prevents other local users from creating hard links or FIFOs at the log path.
  • On Windows, avoid using the default log location by moving logs to a protected directory with limited permissions, or explicitly disable the default log creation. Ensuring that the log directory is owned by the service account and that only that account has write access eliminates the possibility of local users reading or writing victim files.

Generated by OpenCVE AI on November 29, 2026 at 19: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 With Debug or CommLog on, psqlODBC writes its log files to a shared directory under predictable names. By default that is /tmp on Unix-like systems and C:\ on Windows, and each file name holds the process ID. The logs hold SQL text, data and connection details. On Unix-like systems, the fix for CVE-2026-120066 in 18.00.0006 made the driver refuse a symbolic link at the log path. It used an existing file only if it was a regular file owned by the user running the application. It did not check whether the file had other hard links. So another local user could create a hard link at the log path to a file the victim owns. The link passed every check, and the driver appended its log to the victim's file. A FIFO at the log path is a second case, which CVE-2026-120066 did not cover: opening it blocked the application until another process read from it. On Windows, the fix for CVE-2026-120066 did not apply, and the driver opened the log file without any of these checks. A log file created in C:\ by a service or an elevated process got that directory's permissions, which let other local users read it. In a log directory created under C:\ with default permissions, they could also modify it. A file that another user had already created at the log path was used as it was. The MSDTC log in C:\ or C:\pgdtclog was opened the same way. Debug and CommLog are off by default, and only an administrator turns them on. Versions up to and including psqlODBC 18.00.0007 are affected.
Title Another local user can read the driver's log files or make it write into the victim's own files (incomplete fix for CVE-2026-120066)
Weaknesses CWE-379
CWE-59
CWE-732
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-379

    Creation of Temporary File in Directory with Insecure Permissions

  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

  • CWE-732

    Incorrect Permission Assignment for Critical Resource

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Nov 29, 2026, 6:01 PM
Reserved
Nov 29, 2026, 4:10 PM
Status
Awaiting Analysis
Published
Nov 29, 2026, 7:17 PM
Modified
Nov 30, 2026, 3:28 PM