Memory corruption in psqlODBC when rewriting cursor and escape SQL
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- Denial of service, 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-674, CWE-787 and the CVSS impact.
Summary
PostgreSQL psqlODBC through 18.00.0006 is affected. The driver rewrites statement text for keyset-driven cursors and ODBC escapes using positions that can lie outside the text or belong to another statement (CWE-787). Someone who supplies the text of a statement opened on a keyset-driven or dynamic cursor with a concurrency other than read-only, or called with an output parameter, such as a user of a query tool, can corrupt the application's heap and crash it. Code execution has not been demonstrated.
Written with Claude Haiku 5.5 from the sources below · 2026-11-25
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PostgreSQL | psqlODBC | up to 18.00.0006 | — | No fix listed | CNA |
- psqlODBC VendorPostgreSQL Affected up to 18.00.0006 Fixed in — No fix listed CNA
Remediation
The sources list no fixed version for psqlODBC.
Written with Claude Haiku 5.5 from the sources below · 2026-11-25
Timeline
- 2026-11-25 Threatist record created from CVE-2026-136515
References
Advisory 1
Other 1
More PostgreSQL vulnerabilities
- 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
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences