CVE-2026-120063

psqlODBC stack buffer overflow when quoting long schema and table names

Published Nov 2, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
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.

Remediation

Vendor Solution

Upgrade to psqlODBC 18.00.0006 or later. identifierEscape bounds every write to the output buffer, including the closing quote and the terminator.


Vendor Workaround

Do not pass SQL text from untrusted sources to the driver.

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': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title psqlODBC stack buffer overflow when quoting long schema and table names
Weaknesses CWE-121
CWE-787
References
Metrics cvssV3_1

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

Weaknesses

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
Moderate
Public date
Nov 2, 2026, 7:09 PM