CVE-2026-138406: Another local user's pgenlist.dll runs in the application
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 SQLATTRENLISTINDTC 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.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed?
Only Windows deployments using psqlODBC versions up to and including 18.00.0007 are affected, and only when an application enlists in MSDTC by setting SQL_ATTR_ENLIST_IN_DTC. Applications that never set that attribute do not load pgenlist.dll and are unaffected.
What access does an attacker need?
The attacker needs local access and the ability to write a malicious pgenlist.dll into the application directory, the current directory, or a directory listed in PATH. Exploitation occurs when the application next enlists in MSDTC.
What privileges would malicious code receive?
The malicious DLL runs in the context of the application account, rather than the attacker's account. This can result in privilege escalation where the application runs under a more privileged account, such as on a server.
What can be done before patching?
Prevent untrusted local users from writing to the application directory, current directory, and directories on PATH that the application may search. Where operationally possible, avoid configuring the application to set SQL_ATTR_ENLIST_IN_DTC, since this prevents pgenlist.dll from being loaded.