Read the docs

Use after free and out-of-bounds writes in psqlODBC clean-up

Priority LOW 34CWE-415Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
High
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
No fix listed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-415 and the CVSS impact.

Summary

PostgreSQL psqlODBC up to and including 18.00.0006 frees memory that is still in use, frees it twice, or writes outside an application buffer. A hostile or compromised server, or an attacker on the network path of a connection that does not use sslmode=verify-full, can trigger several of these cases, and a database user who can make a statement fail can trigger some others against an honest server. The demonstrated results are crashes and heap corruption, and code execution has not been demonstrated.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

EPSS 0.00569 40th percentileScored 2026-11-30
Fix No fix listed No fixed version in the sources yet

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
PostgreSQLpsqlODBCup to 18.00.0006—No fix listedCNA
  • psqlODBC VendorPostgreSQL Affected up to 18.00.0006 Fixed in — No fix listed CNA

Remediation

The sources list no fixed version for psqlODBC. Connections should use sslmode=verify-full, as the source description notes.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-136503

References

  • TI-2024-01491 pgjdbc SQL Injection via line comment generation CVSS 3.1CRITICAL 10.0
  • TI-2019-06651 In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and… CVSS 3.0HIGH 7.2
  • TI-2017-05187 Improper authentication in postgresql CVSS 3.0CRITICAL 9.8
  • TI-2022-06097 Unchecked Class Instantiation when providing Plugin Classes CVSS 3.1CRITICAL 9.8
  • TI-2026-96877 SQL injection in pgjdbc simple query mode parameter quoting CVSS 3.1HIGH 8.1
  • TI-2026-96876 SQL injection in pgjdbc through misparsed quoted literals CVSS 3.1HIGH 8.1
See all 256 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences