{"api_version":"1","generated_at":"2026-11-26T13:33:11+00:00","cve":"CVE-2026-136509","urls":{"html":"https://cve.report/CVE-2026-136509","api":"https://cve.report/api/cve/CVE-2026-136509.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-136509","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-136509"},"summary":{"title":"Driver does not check that server replies match the queries it sent","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:\n\n- A FETCH reply with more rows than requested overflows the row cache.\n- Extra results in reply to a FETCH, or to the queries of a keyset-driven cursor, are freed while still in use.\n- A key query of a keyset-driven cursor answered with extra columns, or a re-read row with fewer columns, overflows the row cache.\n- Replies without columns or rows, or with NULL values, to the driver's internal queries at connect time and in catalog functions are dereferenced.\n- A malformed relacl value in SQLTablePrivileges() makes the driver write past a buffer.\n- On Windows with MSDTC, a long transaction name returned by the server overflows a buffer during recovery.\n- 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.\n- 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.\n- 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.\n- An error message ending in the first byte of a multibyte character leaves the SQLSTATE returned by SQLGetDiagRecW() unterminated.\n- 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.\n\nThis 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.\n\nVersions up to and including psqlODBC 18.00.0006 are affected.","state":"PUBLISHED","assigner":"PostgreSQL","published_at":"2026-11-25 23:17:24","updated_at":"2026-11-25 23:17:24"},"problem_types":["CWE-416","CWE-476","CWE-787","CWE-787 CWE-787 Out-of-bounds Write","CWE-416 CWE-416 Use After Free","CWE-476 CWE-476 NULL Pointer Dereference"],"metrics":[{"version":"3.1","source":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","type":"Secondary","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","data":{"baseScore":7.5,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-98mx-57hv-xjpr","name":"https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-98mx-57hv-xjpr","refsource":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://odbc.postgresql.org/changelog/","name":"https://odbc.postgresql.org/changelog/","refsource":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-136509","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-136509","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"PostgreSQL","product":"psqlODBC","version":"affected 18.00.0006 custom","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"collectionURL":"https://odbc.postgresql.org/","defaultStatus":"unaffected","packageName":"psqlodbc","product":"psqlODBC","vendor":"PostgreSQL","versions":[{"lessThanOrEqual":"18.00.0006","status":"affected","version":"0","versionType":"custom"}]}],"descriptions":[{"lang":"en","value":"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:\n\n- A FETCH reply with more rows than requested overflows the row cache.\n- Extra results in reply to a FETCH, or to the queries of a keyset-driven cursor, are freed while still in use.\n- A key query of a keyset-driven cursor answered with extra columns, or a re-read row with fewer columns, overflows the row cache.\n- Replies without columns or rows, or with NULL values, to the driver's internal queries at connect time and in catalog functions are dereferenced.\n- A malformed relacl value in SQLTablePrivileges() makes the driver write past a buffer.\n- On Windows with MSDTC, a long transaction name returned by the server overflows a buffer during recovery.\n- 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.\n- 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.\n- 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.\n- An error message ending in the first byte of a multibyte character leaves the SQLSTATE returned by SQLGetDiagRecW() unterminated.\n- 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.\n\nThis 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.\n\nVersions up to and including psqlODBC 18.00.0006 are affected."}],"metrics":[{"cvssV3_1":{"baseScore":7.5,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-787","description":"CWE-787 Out-of-bounds Write","lang":"en","type":"CWE"},{"cweId":"CWE-416","description":"CWE-416 Use After Free","lang":"en","type":"CWE"},{"cweId":"CWE-476","description":"CWE-476 NULL Pointer Dereference","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-25T22:25:50.395Z","orgId":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","shortName":"PostgreSQL"},"references":[{"name":"GHSA-98mx-57hv-xjpr","tags":["vendor-advisory"],"url":"https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-98mx-57hv-xjpr"},{"name":"psqlODBC changelog","tags":["release-notes"],"url":"https://odbc.postgresql.org/changelog/"}],"title":"Driver does not check that server replies match the queries it sent"}},"cveMetadata":{"assignerOrgId":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","assignerShortName":"PostgreSQL","cveId":"CVE-2026-136509","datePublished":"2026-11-25T22:25:50.395Z","dateReserved":"2026-11-24T20:17:10.904Z","dateUpdated":"2026-11-25T22:25:50.395Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-25 23:17:24","lastModifiedDate":"2026-11-25 23:17:24","problem_types":["CWE-416","CWE-476","CWE-787","CWE-787 CWE-787 Out-of-bounds Write","CWE-416 CWE-416 Use After Free","CWE-476 CWE-476 NULL Pointer Dereference"],"metrics":{"cvssMetricV31":[{"source":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.6,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"136509","Ordinal":"1","Title":"Driver does not check that server replies match the queries it s","CVE":"CVE-2026-136509","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"136509","Ordinal":"1","NoteData":"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:\n\n- A FETCH reply with more rows than requested overflows the row cache.\n- Extra results in reply to a FETCH, or to the queries of a keyset-driven cursor, are freed while still in use.\n- A key query of a keyset-driven cursor answered with extra columns, or a re-read row with fewer columns, overflows the row cache.\n- Replies without columns or rows, or with NULL values, to the driver's internal queries at connect time and in catalog functions are dereferenced.\n- A malformed relacl value in SQLTablePrivileges() makes the driver write past a buffer.\n- On Windows with MSDTC, a long transaction name returned by the server overflows a buffer during recovery.\n- 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.\n- 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.\n- 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.\n- An error message ending in the first byte of a multibyte character leaves the SQLSTATE returned by SQLGetDiagRecW() unterminated.\n- 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.\n\nThis 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.\n\nVersions up to and including psqlODBC 18.00.0006 are affected.","Type":"Description","Title":"Driver does not check that server replies match the queries it s"}]}}}