CVE-2026-136512: Buffer overflows when a converted value does not fit the application's buffer

Published Nov 25, 2026
·
Updated

With SQLCDEFAULT, the C type of a bound column or parameter follows its SQL type. An application sizes its buffer from the type it was told when it described the statement. When the column had another type at fetch time, because the server reported another type, the table was altered, or an output parameter's result column had another type, psqlODBC wrote the larger type into the smaller buffer: 12 bytes past a 4-byte buffer for a uuid, and more in multi-row fetches, where the driver also steps through the array by the larger size.

Other conversions wrote past the application's buffer as well:

- With Int8As set to a smaller type, an int8 column fetched as SQLCDEFAULT was still written as 8 bytes. - An int2vector column fetched as SQLCDEFAULT returned unterminated binary data instead of text. - An output parameter that the application discards by binding a NULL buffer overflowed a stack buffer in the driver. - SQLGetData() with BufferLength 0 on a column the driver reads as a large object wrote a NUL byte past the buffer. - Adding a row with SQLBulkOperations(SQLADD) on a static updatable cursor before the first fetch, then changing that row, rolling back and fetching it, made the keyset index arithmetic free a pointer that was never allocated and corrupt the heap.

This 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), and by the owner of a table the application reads.

Versions up to and including psqlODBC 18.00.0006 are affected.

Affected Software

1 affected component
PostgreSQL psqlODBC<=18.00.0006

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Set sslmode to verify-full for connections to prevent network-path attackers from triggering the issue.

    psqlODBC connection sslmode = verify-full

Event History

Nov 25, 2026
CVE Published
via MITRE·10:25 PM
Data Sourced
via MITRE·10:25 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which application patterns should be prioritized for review?

Review applications using psqlODBC that bind columns or parameters as SQL_C_DEFAULT and size buffers from statement metadata. Also review use of Int8As with smaller types, int2vector retrieval, output parameters bound to NULL buffers, SQLGetData() calls with BufferLength 0, and SQLBulkOperations(SQL_ADD) on static updatable cursors.

2

Can a type change after statement description trigger the issue?

Yes. The overflow can occur when the application allocated a buffer based on the type reported during statement description, but the column has a different type at fetch time. The data identifies server-reported type differences, altered tables, and output-parameter result columns as cases where this can happen.

3

Are multi-row fetches riskier than single-row fetches?

Yes. In multi-row fetches, the driver can both write the larger value into the undersized buffer and advance through the row array using the larger size, which can cause additional out-of-bounds writes.

4

Is binding an output parameter to a NULL buffer a safe way to discard it?

No. The affected behavior includes an output parameter that an application discards by binding a NULL buffer, which can overflow a stack buffer in the driver.

5

Does a zero-length SQLGetData buffer avoid writes?

No. When SQLGetData() is called with BufferLength 0 for a column read as a large object, the driver can write a NUL byte past the buffer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203