# 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)

- **Severity:** MEDIUM 6.3
- **CVSS:** 6.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **CWE:** CWE-59, CWE-732, CWE-379
- **Published:** 2026-11-29T18:01:24.076Z
- **Modified:** 2026-11-29T19:17:01.823Z

> **AI summary (AI-generated, claude-haiku-5-5):** A local user can read psqlODBC driver log files, redirect logging into a victim's files via hard links, or block the application with a FIFO at the log path.

## Who should check

- Anyone running PostgreSQL psqlODBC \<= 18.00.0007

## 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.

## Affected and fixed versions

- PostgreSQL psqlODBC: \<= 18.00.0007 (cvelist)

## Technologies

PostgreSQL

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-138404. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-138404.md
Affected: PostgreSQL psqlODBC <= 18.00.0007
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for PostgreSQL psqlODBC: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-138404 being exploited?

There is no confirmed exploitation: CVE-2026-138404 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-138404?

Medium: CVSS 6.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-138404?

PostgreSQL psqlODBC \<= 18.00.0007.

### Is there a fix for CVE-2026-138404?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-138404?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-g696-gg8r-7j45>
- other: <https://odbc.postgresql.org/changelog/>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-138404>

HTML: <https://flawdb.com/CVE-2026-138404> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-138404>
