PostgreSQL psqlODBC
psqlODBC row cache overflow when a later FETCH changes the column count
psqlODBC sizes its row cache from the column count of a cursor's first result, but recomputes the column count from each later FETCH reply without checking that it matches. A server not trusted under current SSL settings can answer a later FETCH with more columns and make the driver write tuple records past the end of the heap allocation. A keyset reply with fewer columns than the key fields also underflows the unsigned field count. This is reachable with UseDeclareFetch enabled. Versions before psqlODBC 18.00.0006 are affected.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 18.00.0006
Fixed in 18.00.0006
Mitigation
Upgrade to psqlODBC 18.00.0006 or later. The driver rejects a column count that changes between fetches of the same cursor, and a keyset reply with fewer columns than the key fields.
Workaround
Set UseDeclareFetch=0, or connect only to servers authenticated with sslmode=verify-full or an equivalent GSS setting.
References
- Vendor advisory github.com/postgresql-interfaces/psqlodbc/secu…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.