CVE-2026-136503

HighCVSS 7.5/10Last modified Dec 2, 2026

Description

psqlODBC frees memory that is still in use, frees it twice, or writes outside an application buffer in these cases:

- The clean-up the driver runs at commit and rollback sends queries of its own, and the reply to one of them can start the clean-up again while it is running. The nested run frees the rollback log, or the list of cursors and prepared statements to close, and the outer run uses and frees it again. - The callback through which libpq delivers notices could run that clean-up, and close the connection, while libpq was still using the connection. - Freeing a statement whose result holds several cursors (FetchRefcursors=1, or UseDeclareFetch=1) used the freed first result while the later cursors were closed. - With UseDeclareFetch=1, after a rollback closed an updatable cursor, rows added or deleted through it were counted but not stored, so freeing the statement freed uninitialised pointers, and adding a row wrote past the keyset. - After a multi-row fetch failed on a row other than the first of its rowset, SQLGetData() wrote at an offset past the buffer the application passed. - SQLProcedureColumns() freed the result of its catalog query twice when the query failed. - In a process named sqlservr (SQL Server linked servers), a server version below 8.4 made the statement parser free a buffer twice. - A failed SQLPutData in the middle of a SQLSetPos() or SQLBulkOperations() data-at-execution sequence left the whole operation pending, with the internal statement still allocated and autocommit silently off, so later statements were rolled back at disconnect. The next positioned update ran the stale callback against a statement that was never executed and dereferenced NULL.

Most of these can be triggered by 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). A database user who can make a statement fail, or who controls the contents of a row the application reads, can trigger the UseDeclareFetch=1 and SQLGetData() cases against an honest server. 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

CVSS 3.1 7.5/10CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Weakness enumeration

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

VendorProductVersions
PostgreSQLpsqlODBC<= 18.00.0006

References

Timeline

Published
Nov 25, 2026
Last modified
Dec 2, 2026
NVD status
Awaiting Analysis

Related CVEs from 2026

CVE-2026-1365045.0With the driver's debug log (MyLog) turned on, two paths write the database password to the log in clear text, both beside a line where the CVE-2026-1365057.5psqlODBC uses sizes and counts without checking their range, or keeps them in types too small for them: - A row array size of 0, set with SCVE-2026-1365067.5psqlODBC builds queries of its own from names, and put these names into them without escaping or qualification: - the database name in SQLFCVE-2026-1365078.1psqlODBC parsed and built connection strings in ways that let a value end early: - In a braced value, such as PWD={…}, a trailing byte 0x7dCVE-2026-1365086.8On Windows, when a connection takes part in a distributed transaction, psqlODBC and its XA library open further connections of their own to CVE-2026-1365097.5psqlODBC 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 hasCVE-2026-1365104.8A parameter-array execution that fails part-way leaves the rows it has already queued on the statement handle, and the next execution on thaCVE-2026-1365116.8psqlODBC mapped an SSLmode value in a connection string that it did not recognise, such as SSLmode=Require, SSLmode=Verify-Full, SSLmode={reCVE-2026-1365127.5With SQL_C_DEFAULT, the C type of a bound column or parameter follows its SQL type. An application sizes its buffer from the type it was tolCVE-2026-1365133.6When Debug or CommLog is enabled and the log directory cannot be used, psqlODBC falls back to a directory under the user's home directory. ICVE-2026-1365146.5psqlODBC assumed that a table it reads keeps the definition it had when the statement was described or parsed. A database user who owns a taCVE-2026-1365157.5psqlODBC rewrites statement text for keyset-driven cursors and ODBC escapes using positions it found in the text. These positions could lie
CVE-2026-136503: High severity, CVSS 7.5 | Vulnix