Summary
The psqlODBC driver, when building positioned updates and describing columns, matches statement names against the catalog differently from the server: case-insensitively (tables, schemas, columns), misreading FROM ONLY, folding accented letters differently in single-byte encodings (LATIN1, SQL_ASCII), and mishandling I in Turkish/Azeri locales. Additionally, SQLSpecialColumns() and SQLPrimaryKeys() without a schema name can report another user's table, after search_path changes other than via a plain SET, writes go to the previously current schema's table, and SQLBulkOperations() trusts the ctid in an application-supplied bookmark while ignoring the cursor's WHERE clause. With Parse=1, an application buffer can be overflowed on fetch.
CVSS 7.1: network attack, high complexity, low-privileged login required and user interaction needed (the victim must perform the operation). A user able to create a table in a schema on another user's search_path can redirect that user's positioned updates, inserts and deletes to a table of their choosing, executed with the victim's rights, or run an arbitrary expression under the victim's role. Full impact on confidentiality, integrity and availability is possible.
Versions up to and including 18.00.0006 are affected. Not listed in CISA KEV.
Who is affected
Organizations whose applications access PostgreSQL through psqlODBC 18.00.0006 or earlier, especially in databases shared by multiple users.
What to do
- Inventory systems using psqlODBC and check the version (≤ 18.00.0006 is vulnerable).
- No fixed version is listed in the record – check the official advisory (GHSA-38cc-jj5v-wrg6) and the changelog at odbc.postgresql.org and upgrade to a fixed release.
- Restrict CREATE privilege on schemas that appear on other users' search_path (e.g. public) and review search_path settings.
- Use schema-qualified table names in applications and review reliance on positioned updates, SQLBulkOperations() and the Parse=1 option.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
- Attack vector
- Network (from the internet)
- Attack complexity
- High
- Privileges required
- Regular user
- User interaction
- Required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
References
- github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-38cc-jj5v-wrg6 vendor advisory
- odbc.postgresql.org/changelog/
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.