PostgreSQL psqlODBC
psqlODBC large-object read overflows the application buffer
psqlODBC copies the reply to a large-object read (loread) into the application's buffer using the length sent by the server, without comparing it to the buffer size. A server not trusted under current SSL settings, or a man-in-the-middle, can return more bytes than the buffer holds and overwrite adjacent memory in the client process with server-chosen bytes. Fetching any large-object column is sufficient to trigger it. 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. CC_send_function receives the caller's buffer size, clamps the copy to it, and rejects short fixed-size replies.
Workaround
Do not fetch large-object (lo) columns from servers that are not 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.