CVE-2026-120058 psqlODBC row cache overflow when a later FETCH changes the column count

High 7.5 Published Updated
Exploited in the wild
Not known
Fix
Available

What is CVE-2026-120058?

CVE-2026-120058 is a high-severity vulnerability in PostgreSQL psqlODBC, published on 2 Nov 2026.

Official description

psqlODBC sizes its row cache from the column count of a cursor's first result, but recomputes the column count from each later FETCH reply without checking that it matches. A server not trusted under current SSL settings can answer a later FETCH with more columns and make the driver write tuple records past the end of the heap allocation. A keyset reply with fewer columns than the key fields also underflows the unsigned field count. This is reachable with UseDeclareFetch enabled. Versions before psqlODBC 18.00.0006 are affected.

Weakness: CWE-787, CWE-191

Which versions are affected by CVE-2026-120058?

How do I fix CVE-2026-120058?

Upgrade to a fixed version.

Is CVE-2026-120058 being exploited?

There is no known exploitation of CVE-2026-120058 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-120058, GHSA-239q-q7g3-5876, GHSA-6rmx-9q62-4w6m, UBUNTU-CVE-2026-120058.

Is CVE-2026-120058 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free