CVE-2026-136515
Received
Received - Intake
Heap Corruption in psqlODBC Driver via Malformed SQL Statements
Vulnerability report for CVE-2026-136515, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.
Publication date: 2026-11-25
Last updated on: 2026-11-25
Assigner: PostgreSQL
Description
Description
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.
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| PostgreSQL | psqlODBC | From 0 (inc) to 18.0.6 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-787 | The product writes data past the end, or before the beginning, of the intended buffer. |
| CWE-674 | The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. |
| CWE-125 | The product reads data past the end, or before the beginning, of the intended buffer. |