CVE-2026-136515: Memory corruption and crashes when the driver rewrites statements for cursors and escapes

Published Nov 25, 2026
·
Updated

psqlODBC rewrites statement text for keyset-driven cursors and ODBC escapes using positions it found in the text. These positions could lie outside the text or describe another statement:

- After SQLExecDirect() failed on a statement handle, the FROM and WHERE positions of the failed statement were applied to the next, shorter statement on that handle. - The parser could record a FROM position with no text after it, and the rewrite then copied a negative length. - An {fn …} escape whose arguments contain FOR UPDATE, ; or INTO … FROM made the driver remove a cursor prefix from the wrong buffer. - {fn CONVERT(?, …)} with an output parameter produced a negative argument length. - An unclosed {fn …} escape made the driver read past the statement, and a few thousand nested ones exhausted the stack. - Translating @@identity in long statement text read an uninitialised pointer, and {? = call …} with nothing bound for the return value dereferenced NULL.

Whoever supplies the text of a statement that an application opens on a keyset-driven or dynamic cursor with a concurrency other than read-only, or calls with an output parameter, can corrupt the application's heap and end it. That includes the users of query tools, report builders and other applications that run SQL their users type. Code execution has not been demonstrated.

Versions up to and including psqlODBC 18.00.0006 are affected.

Affected Software

1 affected component
PostgreSQL psqlODBC<=18.00.0006

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 applications are realistically exposed to this issue?

Applications using psqlODBC are exposed when untrusted parties can supply SQL statement text that is executed with a keyset-driven or dynamic cursor using a concurrency mode other than read-only, or when calls use output parameters. The affected paths also include ODBC escape processing and specific statement forms described in the advisory.

2

What access does an attacker need to trigger the issue?

An attacker needs the ability to control statement text supplied to the application, or to influence calls involving output parameters. No user interaction is required, but exploitation has high attack complexity and requires low privileges.

3

What can happen if the flaw is triggered?

The driver can corrupt the application's heap, cause the application to crash, read beyond statement text, exhaust the stack, dereference NULL, or use an uninitialised pointer. The reported impact includes high confidentiality, integrity, and availability consequences.

4

How can teams identify potentially affected usage before a fix is available?

Review applications using psqlODBC for SQLExecDirect() calls that reuse a statement handle after a failed execution, keyset-driven or dynamic cursors with non-read-only concurrency, ODBC {fn …} escapes, @@identity translation, and {? = call …} statements with an unbound return value. Also review calls with output parameters, particularly {fn CONVERT(?, …)}.

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