# CVE-2026-136505: Unchecked sizes and counters overflow driver buffers

Status: published. Published: 2026-11-25. Updated: 2026-11-25.

psqlODBC uses sizes and counts without checking their range, or keeps them in types too small for them:

- A row array size of 0, set with SQLSetStmtAttr() or on the ARD, makes SQLSetPos() with SQL_REFRESH write past the bound arrays.
- SQL_DESC_COUNT above 32767 on an APD or IPD writes before the start of a heap buffer.
- A numeric parameter with a negative scale overflows a stack buffer.
- SQLGetData() of a text value of 2 GiB or more into a wide-character buffer computes a wrapped size and overflows the heap.
- The 16-bit reference count and size of the statement parser's column-information cache wrap, which frees a cache entry still in use or overflows the cache, and a statement with more than 32768 columns overflows the parser's field array.
- An updatable cursor that records more than 65535 changes in one transaction wraps the 16-bit capacity of its rollback log, which overflows it and frees it twice.
- A statement with 32769 or more parameter markers overflows a 16-bit parameter count.
- A wide-character string of more than 2 GiB wraps the size of its UTF-8 conversion, which is then written below the start of a heap buffer.
- SQLGetDiagField() and SQLGetDiagFieldW() always stored the five-character SQLSTATE plus its terminator and checked BufferLength only afterwards, overrunning a buffer shorter than six bytes.
- The ANSI SQLSetDescField(SQL_DESC_NAME) on an IPD ignored BufferLength and copied the name with strdup(), reading a name passed as pointer plus length past its end.
- SQLFetchScroll(SQL_FETCH_BOOKMARK) did not check the bookmark it was given, so whoever chooses the bookmark value read out of bounds and crashed the process.
- Four places in the parameter conversion read one byte past the end of a bound character parameter, and one of them rewrote it.
- Binding a date, time or timestamp C value to an SQL_INTEGER or SQL_SMALLINT parameter dereferenced NULL instead of returning the conversion error.

Depending on the case, the values come from the application, from the data or statement text an end user supplies, or from a database user who controls the size of a table or value. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated.

Versions up to and including psqlODBC 18.00.0006 are affected.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- PostgreSQL / psqlODBC (psqlodbc): ≥ 0; ≤ 18.00.0006 (affected, custom). Source: CNA: PostgreSQL

## Severity and prioritization

- CVSS 3.1: 7.5 (high); CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H; source: CNA: PostgreSQL

- CVSS 3.1: 7.5 (high); CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H; source: NVD: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-190, CWE-787, CWE-121

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-4g4f-phc4-3qh7 (CNA: PostgreSQL; vendor-advisory)

- https://odbc.postgresql.org/changelog/ (CNA: PostgreSQL; release-notes)

- https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-4g4f-phc4-3qh7 (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007)

- https://odbc.postgresql.org/changelog/ (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007)

## Provenance

- CNA: PostgreSQL: https://www.cve.org/CVERecord?id=CVE-2026-136505; retrieved 2026-11-25; source updated 2026-11-25

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-136505; retrieved 2026-11-26; source updated 2026-11-25

Revision: 23d18abf875051aac2758e167e178ba56fa4ef53acc3f3610b3be622e1a050a7

Canonical: https://y2.dev/cve/CVE-2026-136505

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.