CVE-2026-136509
Last modified
CVE-2026-136509 is a high-severity vulnerability rated 7.5/10 on the CVSS scale. psqlODBC did not check that a server reply matches the query it sent: that a FETCH returns no more rows than it asked for, that each row has the described number of columns, that one query produces one result, and that a COPY, a transaction or the connection ends where the protocol says. By sending replies that do not match, a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable) can corrupt memory in the application: - A FETCH reply with more rows than requested overflows the row cache. - Extra results in reply to a FETCH, or to the queries of a keyset-driven cursor, are freed while still in use. - A key query of a keyset-driven cursor answered with extra columns, or a re-read row with fewer columns, overflows the row cache. - Replies without columns or rows, or with NULL values, to the driver's internal queries at connect time and in catalog functions are dereferenced. - A malformed relacl value in SQLTablePrivileges() makes the driver write past a buffer. - On Windows with MSDTC, a long transaction name returned by the server overflows a buffer during recovery. - Values in replies to the driver's internal queries are used without checking their range: an empty column name, a parameter count, a large-object size, a function's or trigger's argument count, and a result of exactly 32767 columns.
Description
psqlODBC did not check that a server reply matches the query it sent: that a FETCH returns no more rows than it asked for, that each row has the described number of columns, that one query produces one result, and that a COPY, a transaction or the connection ends where the protocol says. By sending replies that do not match, a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable) can corrupt memory in the application: - A FETCH reply with more rows than requested overflows the row cache. - Extra results in reply to a FETCH, or to the queries of a keyset-driven cursor, are freed while still in use. - A key query of a keyset-driven cursor answered with extra columns, or a re-read row with fewer columns, overflows the row cache. - Replies without columns or rows, or with NULL values, to the driver's internal queries at connect time and in catalog functions are dereferenced. - A malformed relacl value in SQLTablePrivileges() makes the driver write past a buffer. - On Windows with MSDTC, a long transaction name returned by the server overflows a buffer during recovery. - Values in replies to the driver's internal queries are used without checking their range: an empty column name, a parameter count, a large-object size, a function's or trigger's argument count, and a result of exactly 32767 columns. They are dereferenced, read past, returned to the application or sent back to the server as stack memory, or make the driver loop forever. - A reply that ends a COPY, the connection or the transaction at an unexpected point leaves freed results, keysets or table information in use: a CopyOutResponse followed by a lost connection, a ROLLBACK command tag under UseDeclareFetch=1, or a lost connection while a cursor with positioned updates is closed. Eight extra bytes in a reply also make the driver wait forever for a COPY to end. - On Windows, a start-up reply without client_encoding crashes the driver, and with MSDTC a failed connection makes the XA library use a connection it has already freed. - An error message ending in the first byte of a multibyte character leaves the SQLSTATE returned by SQLGetDiagRecW() unterminated. - When a string value did not fit the application's buffer, eight Unicode entry points filled the buffer and wrote no null terminator, so a caller that reads to the terminator, as ODBC allows, read past the end of its own buffer. This continues the fixes for CVE-2026-120058 and CVE-2026-120060, which covered other replies. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.
Metrics
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| PostgreSQL | psqlODBC | <= 18.00.0006 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-136509?
How severe is CVE-2026-136509?
How do I fix CVE-2026-136509?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-136503psqlODBC frees memory that is still in use, frees it twice, …7.5
- CVE-2026-136504With the driver's debug log (MyLog) turned on, two paths wri…5
- CVE-2026-136505psqlODBC uses sizes and counts without checking their range,…7.5
- CVE-2026-136506psqlODBC builds queries of its own from names, and put these…7.5
- CVE-2026-136507psqlODBC parsed and built connection strings in ways that le…8.1
- CVE-2026-136508On Windows, when a connection takes part in a distributed tr…6.8
- CVE-2026-136510A parameter-array execution that fails part-way leaves the r…4.8
- CVE-2026-136511psqlODBC mapped an SSLmode value in a connection string that…6.8
- CVE-2026-136512With SQL_C_DEFAULT, the C type of a bound column or paramete…7.5
- CVE-2026-136513When Debug or CommLog is enabled and the log directory canno…3.6
- CVE-2026-136514psqlODBC assumed that a table it reads keeps the definition …6.5
- CVE-2026-136515psqlODBC rewrites statement text for keyset-driven cursors a…7.5
Are you affected by CVE-2026-136509?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
