CVE-2026-120064

psqlODBC does not validate column numbers and row indexes in binding and descriptor functions

Published Nov 2, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
Several psqlODBC entry points use an application-supplied column number or row index as an array index without validating it. SQLBindCol with a column number above 32767 wraps the binding count negative and a later copy runs off the array. A negative SQL_DESC_COUNT on an application row descriptor unbinds columns at negative indexes. SQLColAttribute with a very large column number uses a negative index. SQLSetPos(SQL_ADD) does not check the row number against the rowset size. An application that forwards untrusted column or row numbers exposes its process to out-of-bounds reads and writes. Versions before psqlODBC 18.00.0006 are affected.

Analysis

AI-generated

Technical impact

The psqlODBC driver accepts a column number or row index supplied by the application and uses it directly as an array index without validation. When a column number greater than 32767 or a negative descriptor count is passed, or when an excessively large column number is used with SQLColAttribute, the driver ends up indexing a negative or out‑of‑bounds array element. This allows unvalidated reads and writes that can corrupt memory or expose sensitive data, potentially crashing the application or enabling an attacker to inject malicious code. The weakness arises from improper validation of array indexes (CWE‑129), integer wraparound (CWE‑190), and may also lead to buffer over‑reads or writes due to unchecked descriptor values (CWE‑787).

Affected Systems

The vulnerability affects the psqlODBC driver supplied by PostgreSQL. All installations using versions prior to 18.00.0006 are impacted; newer releases have added bounds checks and reject invalid column numbers or row indexes. The issue is tied to the PostgreSQL driver for ODBC, commonly used by applications interfacing with PostgreSQL databases.

Risk and Exploitability

The base CVSS score of 7.5 classifies the flaw as high severity. Exploit probability data (EPSS) is less than 1%, and the vulnerability is not listed in the CISA KEV catalog, indicating no known widespread, actively exploited instances as of the last update. The likely attack vector is local to the process that loads the driver; however, if the driver is invoked by software that accepts untrusted user input for column or row numbers, a remote attacker could supply malicious values and trigger the out‑of‑bounds access. In either scenario, the lack of bounds checking poses a significant risk to confidentiality, integrity, and availability of the affected application.

Remediation

Vendor Solution

Upgrade to psqlODBC 18.00.0006 or later. SQLBindCol rejects column numbers above 32767 with SQLSTATE 07009, a negative descriptor count is ignored, and the column and row indexes are range-checked.


Vendor Workaround

Validate column numbers (1..32767 and within the result set) and row numbers (within the rowset) in the application before calling the driver.


OpenCVE Recommended Actions

  • Upgrade psqlODBC to version 18.00.0006 or later, which validates column numbers and row indexes and rejects values outside the allowed range.
  • Validate column numbers (1–32767 and within the result set) and row numbers (within the rowset) in the application before invoking psqlODBC calls.
  • If the software cannot be updated right now, enforce application‑level access controls so that only trusted users or processes can call functions that supply column or row numbers, thereby reducing the attack surface.

Generated by OpenCVE AI on November 6, 2026 at 01:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Postgresql
Postgresql psqlodbc
Vendors & Products Postgresql
Postgresql psqlodbc
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Several psqlODBC entry points use an application-supplied column number or row index as an array index without validating it. SQLBindCol with a column number above 32767 wraps the binding count negative and a later copy runs off the array. A negative SQL_DESC_COUNT on an application row descriptor unbinds columns at negative indexes. SQLColAttribute with a very large column number uses a negative index. SQLSetPos(SQL_ADD) does not check the row number against the rowset size. An application that forwards untrusted column or row numbers exposes its process to out-of-bounds reads and writes. Versions before psqlODBC 18.00.0006 are affected.
Title psqlODBC does not validate column numbers and row indexes in binding and descriptor functions
Weaknesses CWE-129
CWE-190
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-129

    Improper Validation of Array Index

  • CWE-190

    Integer Overflow or Wraparound

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Nov 2, 2026, 7:36 PM
Reserved
Oct 30, 2026, 7:25 PM
Status
Awaiting Analysis
Published
Nov 2, 2026, 7:18 PM
Modified
Nov 2, 2026, 8:17 PM
Severity
Important
Public date
Nov 2, 2026, 7:09 PM