Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 7.5CVE-2026-136512

psqlODBC: out-of-bounds writes when converted values exceed the application buffer

Published 25/11/2026 · Updated 25/11/2026 · PostgreSQL psqlODBC

Summary

The PostgreSQL ODBC driver psqlODBC, up to and including version 18.00.0006, writes past the application's buffers in several cases (CWE-787). With SQL_C_DEFAULT, the C type of a bound column or parameter follows its SQL type. If the column's type at fetch time differs from the type the application saw when it described the statement, the driver writes the larger type into the smaller buffer. This happens when the server reports another type, when the table was altered, or when an output parameter's result column has another type. For example, it writes 12 bytes past a 4-byte buffer for a uuid, and more in multi-row fetches. Additional cases include Int8As set to a smaller type, int2vector columns, output parameters bound to a NULL buffer (a stack overflow inside the driver), and SQLGetData() with BufferLength 0 on a large object. A specific SQLBulkOperations(SQL_ADD) sequence on a static updatable cursor also frees a pointer that was never allocated and corrupts the heap.

The CVSS 3.1 score is 7.5 (High). The attack works over the network and needs no authentication, but it has high complexity and requires some action on the application or user side. It can be triggered by a hostile or compromised server. It can also be triggered by anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable), or by the owner of a table the application reads.

Successful exploitation can affect the confidentiality, integrity and availability of the client application process. Possible outcomes are memory corruption, crashes and potentially code execution. The vulnerability is not listed in CISA KEV.

Who is affected

Organizations whose applications connect to PostgreSQL through the psqlODBC driver, version 18.00.0006 or earlier.

What to do

  1. No fixed version is listed in the record. Check the official advisory (GHSA-c66p-8p63-p7mr and https://odbc.postgresql.org/changelog/) and upgrade psqlODBC to a version that fixes the issue.
  2. Inventory the systems and applications that use psqlODBC and verify the installed version.
  3. Use sslmode=verify-full for PostgreSQL connections to block on-path attackers, because the default is disable.
  4. Connect only to trusted servers and review who owns or can alter the tables your applications read.

Affected products and versions

PostgreSQL psqlODBC≤ 18.00.0006

CVSS vector, explained

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

Attack vector
Network (from the internet)
Attack complexity
High
Privileges required
None (no login)
User interaction
Required
Scope
Vulnerable component only
Confidentiality
High impact
Integrity
High impact
Availability
High impact

Weakness type (CWE)

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.