CVE-2026-120058
Awaiting Analysis Awaiting Analysis - Queue

Heap Buffer Overflow in psqlODBC Driver

Vulnerability report for CVE-2026-120058, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-02

Last updated on: 2026-11-02

Assigner: PostgreSQL

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-02
Last Modified
2026-11-02
Generated
2026-11-02
AI Q&A
2026-11-02
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
PostgreSQL psqlODBC 0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.
CWE-191 The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves psqlODBC incorrectly handling column counts in cursor result sets. When UseDeclareFetch is enabled, the driver caches row sizes based on the first result's column count but fails to validate subsequent FETCH replies. A malicious server can send mismatched column counts, causing buffer overflows or underflows in memory allocation.

Detection Guidance

Detection requires checking the psqlODBC version and configuration. Use 'psqlodbc --version' to verify if the installed version is below 18.00.0006. Check PostgreSQL server logs for unusual FETCH responses or mismatched column counts during queries with UseDeclareFetch enabled.

Impact Analysis

An attacker exploiting this could execute arbitrary code, crash applications, or access sensitive data. Systems using psqlODBC with untrusted PostgreSQL servers are at risk, especially if UseDeclareFetch is enabled.

Mitigation Strategies

Upgrade psqlODBC to version 18.00.0006 or later. Disable UseDeclareFetch in your ODBC configuration if not required. Ensure SSL settings are properly configured to prevent untrusted server responses.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-120058. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...