CVE Watchtower

CVE-2026-136503PostgreSQL psqlODBC Double Free

NVDCVSS scored by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

Vulnerability Summary

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.
Severity Level
HIGH(7.5)
Published Date
Nov 25, 2026
Last Modified
Nov 25, 2026
Exploitation Status
No confirmed exploitation yet
Root Weakness (CWE)
The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.
The product reuses or references memory after it has been freed, which can cause a crash or execution of arbitrary code.
The product writes data past the end, or before the beginning, of the intended buffer.
CVSS v3.1 Base Metrics — Score 7.5 (HIGH)
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • PostgreSQL psqlODBC <= 18.00.0006
Patched Versions
  • PostgreSQL psqlODBC 18.00.0006

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run PostgreSQL psqlODBC and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • Nov 25, 2026Published
  • Nov 25, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new PostgreSQL psqlODBC CVEsYou are reading CVE-2026-136503. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Nov 26, 2026 04:06 UTC