Skip to content
DayZeroHub
High Not yet writtenCVSS 7.5CVE-2026-136503

CVE-2026-136503: Use after free, double free and out-of-bounds writes in result and transaction clean-up

PostgreSQL psqlODBC

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-136503: high-severity vulnerability (CVSS 7.5) in PostgreSQL psqlODBC.

What happened

Original description from the source: 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…

Why it matters

High severity, CVSS 7.5.

Affected products and versions

PostgreSQL psqlODBC <= 18.00.0006

ProductVersionsFixed in
PostgreSQL psqlODBC<= 18.00.0006—

Action recommended by the source

See the official references for the fix or mitigation.

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-416, CWE-415, CWE-787

Relevant change history

  1. Published

    Preliminary advisory published.