Read the docs

psqlODBC stack buffer overflow when quoting long schema and table names

Priority LOW 26CWE-121Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
None · Low · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA.

Summary

psqlODBC, the PostgreSQL ODBC driver, has a length check that lets quoting of long schema and table names write up to two bytes past a 128-byte stack buffer, a stack-based buffer overflow (CWE-121). An application that forwards untrusted SQL text to the driver can have its process stack corrupted. Versions before 18.00.0006 are affected.

Written with Claude Haiku 5.5 from the sources below · 2026-11-06

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00271 19th percentileScored 2026-11-07
Fix Fixed psqlODBC (PostgreSQL): 18.00.0006

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
PostgreSQLpsqlODBCbefore 18.00.000618.00.0006Patch availableCNA
  • psqlODBC VendorPostgreSQL Affected before 18.00.0006 Fixed in 18.00.0006 Patch available CNA

Remediation

Upgrade psqlODBC to version 18.00.0006 or later.

Written with Claude Haiku 5.5 from the sources below · 2026-11-06

  • Fix · CNA psqlODBC (PostgreSQL) Fixed in 18.00.0006

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    PostgreSQL psqlODBC 18.00.0006

    11 records Highest priority Priority LOW 11 LOW

    Other records, highest priority first

    • TI-2026-83949 Out-of-bounds access in psqlODBC via unchecked column and row numbersPriority LOW 35
    • TI-2026-83947 SQL injection in psqlODBC SQLSpecialColumns table and schema namesPriority LOW 35
    • TI-2026-83946 Stack buffer overflow in psqlODBC ODBC escape parserPriority LOW 35

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-11-02 Threatist record created from CVE-2026-120063
  2. 2026-11-02 CISA SSVC decision points changed
  3. 2026-11-02 Priority changed: MEDIUM → LOW
  4. 2026-11-02 Alias added: GHSA-5xmp-p3qm-7hxq
  5. 2026-11-06 Affected versions changed · Red Hat
  6. 2026-11-06 CVSS score added · Red Hat

References

  • TI-2024-01491 pgjdbc SQL Injection via line comment generation CVSS 3.1CRITICAL 10.0
  • TI-2019-06651 In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and… CVSS 3.0HIGH 7.2
  • TI-2017-05187 Improper authentication in postgresql CVSS 3.0CRITICAL 9.8
  • TI-2022-06097 Unchecked Class Instantiation when providing Plugin Classes CVSS 3.1CRITICAL 9.8
  • TI-2022-13237 SQL Injection in ResultSet.refreshRow() with malicious column names in pgjdbc CVSS 3.1HIGH 8.0
  • TI-2020-15711 SQL injection in postgresql CVSS 3.1HIGH 8.8
See all 228 →

Sources