psqlODBC stack buffer overflow when quoting long schema and table names
Summary
| CVE | CVE-2026-120063 |
|---|---|
| State | PUBLISHED |
| Assigner | PostgreSQL |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-02 19:18:03 UTC |
| Updated | 2026-11-02 20:17:39 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 5.9 MEDIUM from f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
Problem Types: CWE-121 | CWE-787 | CWE-121 CWE-121 Stack-based Buffer Overflow | CWE-787 CWE-787 Out-of-bounds Write
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 | Secondary | 5.9 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H |
| 3.1 | CNA | CVSS | 5.9 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
LowAvailability
HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | PostgreSQL | PsqlODBC | affected 18.00.0006 custom | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-285r-... | f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
Solutions
CNA: Upgrade to psqlODBC 18.00.0006 or later. identifierEscape bounds every write to the output buffer, including the closing quote and the terminator.
Workarounds
CNA: Do not pass SQL text from untrusted sources to the driver.
There are currently no legacy QID mappings associated with this CVE.