---
id: "CVE-2026-120063"
kind: "vulnerability"
aliases: ["CVE-2026-120063"]
title: "psqlODBC: long schema or table name overflows stack buffer by two bytes"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["odbc", "package", "postgresql", "psqlodbc"]
not_affected_if: ["driver-not-used", "fixed-sql-only", "version-18.00.0006-or-later"]
published_at: "2026-11-02T19:18:03+00:00"
first_seen_at: "2026-11-02T19:24:40+00:00"
updated_at: "2026-11-02T19:26:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120063", "first_seen_at": "2026-11-02T19:24:40+00:00"}]
---

# psqlODBC: long schema or table name overflows stack buffer by two bytes

psqlODBC, the PostgreSQL ODBC driver, copies a schema or table name into a 128-byte stack buffer without a correct length check, so a long name writes up to two bytes past the end. An application that forwards untrusted SQL text to the driver can have its process stack corrupted.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed driver version (for example with `odbcinst -q -d` or the driver's package manager entry) and see whether it is below `18.00.0006`.
- Find whether the application passes user-supplied SQL text to the ODBC driver unchanged.

## Fix

- psqlODBC: move to `18.00.0006` or later.

## Timeline

- 2026-11-02T19:24:40+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120063

## Documents

- [advisory] Vendor advisory: github.com https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-285r-84w3-xcxv

## From the sources

When psqlODBC quotes a schema or table name into a 128-byte stack buffer, its length check lets it write up to two bytes past the end of the buffer for a long name. The names come from the application's SQL text: the table of a statement the driver parses to describe its columns, and the target of the last INSERT when the driver rewrites SELECT @@IDENTITY. In the @@IDENTITY rewrite, a column name sent by the server can also write one byte past the buffer. The bytes written past the buffer are a double quote and a NUL. An application that forwards untrusted SQL text to the driver exposes its process to stack corruption. Versions before psqlODBC 18.00.0006 are affected.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
