Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 8.1CVE-2026-136507

psqlODBC: connection string injection and stack buffer overflow (MSDTC XA)

Published 25/11/2026 · Updated 25/11/2026 · PostgreSQL psqlODBC

Summary

psqlODBC (the PostgreSQL ODBC driver) up to and including 18.00.0006 parses and builds connection strings in ways that let a value end early. Causes include: a trailing 0x7d byte of GBK, Big5 or SJIS characters being taken as the closing brace in braced values such as PWD={…}; a braced value ending right after an escaped }} not being reported as unterminated; SQLConnectW(), SQLDriverConnectW() and SQLBrowseConnectW() truncating strings longer than 32767 bytes in UTF-8; on Windows with MSDTC, user name and password placed unescaped into the XA open string, with items copied into a 64-byte stack buffer; and percent-encoding a long password writing one byte past a 4096-byte stack buffer.

Per the CVSS vector, the attack is network-based, requires no authentication and no user interaction, but has high complexity (the attacker must influence a value the application puts into the connection string, e.g. a password). An end user can thereby set other connection keywords, for example connecting the application to a server of their choosing. The MSDTC case can also overflow a stack buffer in the process loading the XA library. Impact on confidentiality, integrity and availability is high (CVSS 8.1).

Who is affected

Organizations whose applications use psqlODBC up to 18.00.0006, especially those inserting user-supplied passwords or other values into connection strings, and Windows systems using MSDTC/XA transactions.

What to do

  1. No fixed version is listed in the record – check the official advisory (GHSA-7638-f7xp-wv22) and the changelog at odbc.postgresql.org and upgrade psqlODBC to the fixed release.
  2. Inventory systems and applications with psqlODBC installed and verify the version (≤ 18.00.0006 is vulnerable).
  3. Identify applications that place user input (password, user name) into connection strings and, until patched, restrict or validate such values (length, characters such as braces and semicolons).
  4. On Windows servers, check whether psqlODBC is used with MSDTC/XA and prioritize them for upgrade.
  5. Restrict outbound connections from application servers to known PostgreSQL servers only to reduce redirection risk.

Affected products and versions

PostgreSQL psqlODBC≤ 18.00.0006

CVSS vector, explained

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network (from the internet)
Attack complexity
High
Privileges required
None (no login)
User interaction
Not required
Scope
Vulnerable component only
Confidentiality
High impact
Integrity
High impact
Availability
High impact

Weakness type (CWE)

  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
  • CWE-197 Numeric Truncation Error
  • CWE-121 Stack-based Buffer Overflow

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.