CVE-2026-120058: psqlODBC heap overflow in row cache handling

CVE-2026-120058 · Severity: high · CVSS 7.5 · Published 2026-11-02

psqlODBC is a driver that allows applications to connect to PostgreSQL databases using the ODBC interface. When a server responds to database queries with more columns than expected, the driver writes data beyond the allocated memory region, corrupting the heap. An attacker controlling an untrusted database server or intercepting communications can trigger a crash or potentially execute code on the client system.

Technologies: PostgreSQL psqlODBC. Vendors: PostgreSQL.

Quick answers

Is CVE-2026-120058 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-120058 being exploited in the wild.
How severe is CVE-2026-120058?
High severity, with a CVSS score of 7.5, published 2 November 2026.
Which products and versions are affected?
PostgreSQL psqlODBC before 18.00.0006.
Is there a fix for CVE-2026-120058?
Yes: fixed in 18.00.0006. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-120058 attacked?
It is attacked over the network.
Am I affected by CVE-2026-120058?
Check whether you run PostgreSQL psqlODBC at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 18.00.0006

Technical details

The vulnerability occurs when psqlODBC allocates a row cache based on the column count from an initial cursor result, but recomputes the column count from subsequent FETCH replies without validation. A malicious or compromised server can respond with additional columns, causing out-of-bounds heap writes. Additionally, a keyset reply with fewer columns than key fields causes an unsigned integer underflow. This is reachable when UseDeclareFetch is enabled and the server is not trusted under current SSL settings.

Affected products

  • PostgreSQL psqlODBC before 18.00.0006

Timeline

  • 2026-11-02: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.