---
id: CVE-2026-120060
title: psqlODBC does not validate server-supplied counts and lengths
summary: >-
  psqlODBC trusts counts and lengths in server data in three places.
  SQLBulkOperations uses a server-supplied row count in a size subtraction that
  can underflow. SQLStatistics iterates index keys using a server-supplied key
  count without b…
severity: medium
cvss: 5.9
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:H'
cvssSource: cna
cwe:
  - CWE-125
  - CWE-191
vendor: PostgreSQL
product: psqlODBC
affected:
  - psqlODBC < 18.00.0006
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-11-02T19:21:21.052088Z'
published: '2026-11-02'
updated: '2026-11-02'
sourceUpdated: '2026-11-02T19:43:04.278Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-120060'
references:
  - url: >-
      https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-4mfx-cfxx-c877
tags:
  - cve.org
epss: 0.00216
epssPercentile: 0.1216
ingestedAt: '2026-11-05T19:30:42.807Z'
---

## Overview

psqlODBC trusts counts and lengths in server data in three places. SQLBulkOperations uses a server-supplied row count in a size subtraction that can underflow. SQLStatistics iterates index keys using a server-supplied key count without bounding it to the fixed storage. Bytea octal decoding reads up to two bytes past the end of a truncated escape sequence. A server not trusted under current SSL settings can crash the client or make it read out of bounds. Versions before psqlODBC 18.00.0006 are affected.

## Affected

- `psqlODBC < 18.00.0006`

## Remediation

Upgrade to psqlODBC 18.00.0006 or later. The row count, the index-key count, and the octal escape length are checked before use.

### Workarounds

Connect only to servers authenticated with sslmode=verify-full or an equivalent GSS setting.
