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

- Priority: **Routine**
- Reason: Not severe (CVSS 7.5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-25 · Modified: 2026-12-02
- Aliases: UBUNTU-CVE-2026-136515, DEBIAN-CVE-2026-136515
- Record: https://cvemate.com/vulnerability/CVE-2026-136515 · JSON: https://cvemate.com/vulnerability/CVE-2026-136515/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.527%, percentile 46.169%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian psqlodbc (Debian): All versions (No fix recorded) \| \< 1:18.00.0007-1
- ubuntu psqlodbc (Ubuntu): All versions (No fix recorded)
- postgresql psqlodbc: ≤ 18.00.0006

## References

- <https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-pw7w-x92p-r3q2>
- <https://odbc.postgresql.org/changelog/>
- <https://ubuntu.com/security/CVE-2026-136515>
- <https://www.cve.org/CVERecord?id=CVE-2026-136515>
- <https://security-tracker.debian.org/tracker/CVE-2026-136515>

---

Data as of 2026-12-05T04:50:47.599Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
