cve.bz

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 mediumEPSS 0.2%

Medium (6.3) in postgresql psqlodbc. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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 3.1

6.3 medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L
EPSS
0.2% estimated probability of exploitation activity in the next 30 days; 5th percentile. Scored 2026-11-30. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-59 Improper Link Resolution Before File Access (Link Following)
CWE-379 Creation of Temporary File in Directory with Insecure Permissions
CWE-732 Incorrect Permission Assignment for Critical Resource
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
Assigned by
PostgreSQL (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-138404 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-138404?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-138404?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-138404 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
PostgreSQL psqlODBCthrough 18.00.0007

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14psqlodbcno fix listedDEBIAN-CVE-2026-138404
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 4 morepsqlodbcno fix listedUBUNTU-CVE-2026-138404

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Attack patterns (CAPEC)

  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-732 (11).

References

Check your stackJSON