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)

6.3 medium EPSS 0.18%

Published 29 Nov 2026 Updated 29 Nov 2026 CNA: PostgreSQL

Check your servers for CVE-2026-138404

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138404 affects psqlodbc, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

6.3 medium CVSS 3.1 from PostgreSQL (CNA)
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Privileges required
low: the attacker needs an ordinary user account
User interaction
required: a user has to do something, such as open a link or a file
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability low: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.18%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 8.29% of all scored CVEs. Scores of 1 Dec 2026.

Weakness

  • CWE-59 Improper Link Resolution Before File Access
  • CWE-379 Creation of Temporary File in Directory with Insecure Permissions
  • CWE-732 Incorrect Permission Assignment for Critical Resource

Affected products

As the CNA lists them.

ProductVersions
psqlODBC
package psqlodbc
affected up to and including 18.00.0007
Other versions: unaffected

Is my server affected?

Find the installed version of psqlodbc and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i psqlodbc
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-138404 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-138404

RHEL, Rocky, Alma, Fedora

rpm -q psqlodbc
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-138404

Alpine

apk list --installed | grep -i psqlodbc

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-138404
trivy image --scanners vuln IMAGE | grep CVE-2026-138404

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Patches and release notes

Source: the record CVE-2026-138404 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.