Skip to main content
Menu
CVEs

psqlODBC local code execution via planted pgenlist.dll

Affects all psqlODBC releases before 18.00.0008, where another local user's pgenlist.dll can run inside the application. No fixed version is named in the checked facts.

CVE-2026-138406EUVD-2026-137809Published November 29, 2026, updated

7.3HighCNA
Exploited
No known exploitation
Fix
See vendor advisory
Who is exposed
Specific setups only

Summary

PostgreSQL's psqlODBC driver on Windows, when built with Visual C++ 14 or later, loads pgenlist.dll by name, so a local user who can write to a directory Windows searches for it can plant their own copy. When an application next enlists in MSDTC, that attacker's code runs inside the application under its account, which on a server may have more privileges than the attacker does.

Written by a model

Original description

psqlODBC uses pgenlist.dll, which is installed with the driver, for MSDTC enlistment. It loads the DLL the first time an application enlists. On builds made with Visual C++ 14 or later, it loaded the DLL by name, not by its path. Windows then searched the application's directory, the current directory and the directories on PATH, and none of them is where the driver installs pgenlist.dll.

So another local user who could write to one of those directories could put their own pgenlist.dll there. The next time the application enlisted in MSDTC, that DLL's code ran in the application, under the application's account. On a server, that account can have more privileges than the attacker's own.

An application that never sets SQL_ATTR_ENLIST_IN_DTC does not load pgenlist.dll and is unaffected. Only the Windows builds of the driver use pgenlist.dll.

Versions up to and including psqlODBC 18.00.0007 are affected.

Who should check

Teams running psqlODBC releases before 18.00.0008 with PostgreSQL databases, including on shared local machines or servers.

“All releases before 18.00.0008 are affected.”

odbc.postgresql.org

What to do

  1. Check whether your setup matches what the bug needs.

    Affects all psqlODBC releases before 18.00.0008.
  2. Workaround: The checked facts do not describe a workaround. Check the vendor's advisory for interim measures until a fix is available.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-138406 (Another local user's pgenlist.dll runs in the application), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-138406 (entry last updated 2026-11-29):
Affected:
- PostgreSQL psqlODBC: through 18.00.0007
Fixed versions: none listed yet.
Conditions (all must be true for the bug to be hit):
- Affects all psqlODBC releases before 18.00.0008. (source: https://odbc.postgresql.org/changelog/)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: local access, low-privilege login, a user action.
CISA KEV: CVE-2026-138406 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-138406 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-xqhj-2prq-g662
- https://odbc.postgresql.org/changelog/
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-138406
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-138406"}.

Affected versions

cve.now Index

34Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure5/25Specific setups only
  • Reach17/20Affects PostgreSQL (a widely deployed server, runtime, framework or database)
  • Severity7.3/10CVSS 7.3
  • No patch5/5No fixed version listed; see vendor advisory

What would change the score

  • Would score about 84 if added to CISA KEV
  • Would score about 79 if CISA's SSVC rates exploitation active
  • Would score about 44 if CISA's SSVC rates it automatable

Timeline

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now

Evidence 4

KindSource
Vendor advisory 2Establishes: Affected and fixed versions.
AdvisoryGitHub · postgresql-interfaces/psqlodbc · Advisory GHSA-xqhj-2prq-g662
Linkodbc.postgresql.org · changelog
CVE record 2Establishes: The identifier and description.
RecordCVE List · CVE-2026-138406
RecordNVD · CVE-2026-138406

Questions about CVE-2026-138406

Is CVE-2026-138406 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

What does this mean?

Another local user's pgenlist.dll runs inside the psqlODBC application, so the attacker's code runs under the application's account.

Source: odbc.postgresql.org

Which versions are affected by CVE-2026-138406?

psqlodbc: through 18.00.0007.

Source: cve.now feed data

Am I affected, and how do I check?

All psqlODBC releases before 18.00.0008 are affected. To check an installed copy, look up its psqlODBC version and compare it with 18.00.0008.

Source: odbc.postgresql.org

How do I fix CVE-2026-138406?

The checked facts do not name a fixed release or vendor patch ids, so no upgrade target can be confirmed from them. Check the PostgreSQL advisory for a fixed version.

Source: odbc.postgresql.org

What if there's no patch?

The checked facts do not describe a workaround. Check the vendor's advisory for interim measures until a fix is available.

Source: odbc.postgresql.org

No corrections so far. Something wrong on this page? Report an error.