{"id":"CVE-2026-138404","aliases":["CVE-2026-138404"],"related":[],"kind":"vulnerability","state":"published","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)","summary":"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.\n\nOn 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.\n\nOn 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.\n\nDebug and CommLog are off by default, and only an administrator turns them on.\n\nVersions up to and including psqlODBC 18.00.0007 are affected.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nOn 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.\n\nOn 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.\n\nDebug and CommLog are off by default, and only an administrator turns them on.\n\nVersions up to and including psqlODBC 18.00.0007 are affected.","source":"cvelist"}],"published":"2026-11-29T18:01:24.076Z","modified":"2026-11-30T15:28:09.390Z","severity":{"scorer":"PostgreSQL","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"PostgreSQL","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L","score":6.3,"rating":"MEDIUM"}],"cwes":["CWE-59","CWE-379","CWE-732"],"affected":[{"ranges":[{"type":"custom","introduced":"0","lastAffected":"18.00.0007","status":"affected"}],"vendor":"PostgreSQL","product":"psqlODBC","package":"psqlodbc","source":"cvelist"}],"references":[{"url":"https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-g696-gg8r-7j45","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://odbc.postgresql.org/changelog/","tags":["release-notes"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"PostgreSQL","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138404","url":"https://www.cve.org/CVERecord?id=CVE-2026-138404","licence":"CVE Terms of Use","modified":"2026-11-29T18:01:24.076Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138404","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138404","licence":"Public domain","modified":"2026-11-30T15:28:09.390Z"}],"updatedAt":"2026-11-30T15:32:25.987Z","epss":{"score":0.00183,"percentile":0.08285,"date":"2026-12-01T12:00:22.000Z"}}