Summary
Windows builds of the psqlODBC driver use pgenlist.dll for MSDTC enlistment. On builds made with Visual C++ 14 or later, the DLL was loaded by name rather than by full path. Windows therefore searched the application directory, the current directory and the directories on PATH, none of which is where the driver installs pgenlist.dll (CWE-427). Versions up to and including 18.00.0007 are affected.
According to the CVSS vector, the attack is local and low complexity. It requires a logged-in user with low privileges and user interaction (the application must enlist in MSDTC). Another local user who can write to one of those directories can plant their own pgenlist.dll. Its code then runs inside the application under the application's account, which on a server may hold more privileges than the attacker's own. The impact is full compromise of confidentiality, integrity and availability.
Applications that never set SQL_ATTR_ENLIST_IN_DTC do not load pgenlist.dll and are unaffected. The vulnerability is not in the CISA KEV catalog, and the EPSS score is low (about 0.2%).
Who is affected
Organizations running psqlODBC up to 18.00.0007 on Windows, especially multi-user servers, with applications that enlist in MSDTC transactions.
What to do
- No fixed version is listed in the record. Check the official advisory (GHSA-xqhj-2prq-g662) and the changelog at odbc.postgresql.org, then update psqlODBC to the fixed release.
- Identify applications that use psqlODBC on Windows and set SQL_ATTR_ENLIST_IN_DTC or otherwise use MSDTC.
- Review write permissions on the application directory, the working directory and all directories on PATH. Remove write access for non-administrative users.
- Look for unexpected pgenlist.dll files outside the driver's installation directory.
- Where possible, run applications under least-privileged accounts.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-427 Uncontrolled Search Path Element
References
- github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-xqhj-2prq-g662 vendor advisory
- odbc.postgresql.org/changelog/
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.