psqlODBC
CVE-2026-136507
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted value via application input
-
DeliverySmuggle extra connection keywords using brace/charset escape
-
ExploitRedirect application to attacker-controlled server
-
Execution(MSDTC path) overflow 64-byte XA open-string stack buffer
-
ImpactExecute code in XA-loading process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
|
| Exploitation Conditions | Exploitation requires that the host application incorporates an end-user-supplied value (such as a password or username) into the psqlODBC connection string; without that application behavior there is no injection surface. Specific sub-conditions apply per issue: the premature brace-close requires a GBK, Big5, or SJIS multibyte value whose trailing byte is 0x7d, or a braced value ending immediately after an escaped '}}'; the truncation issue requires use of the wide APIs (SQLConnectW/SQLDriverConnectW/SQLBrowseConnectW) with a connection string whose UTF-8 form exceeds 32767 bytes; the XA/stack-overflow path requires Windows with MSDTC configured for distributed transactions (password/username copied unescaped into a 64-byte stack buffer); the percent-encoding overflow requires a sufficiently long password to write one byte past a 4096-byte stack buffer. Limiting factors: the attacker must be able to control a value the application trusts, exploitation is high-complexity and depends on encoding, string length, or Windows/MSDTC deployment, and the most dangerous code-execution outcome is confined to Windows+MSDTC environments; no authentication is required per PR:N, but the scenario is inherently application-configuration dependent. |
| Impact | This is a genuine, multi-faceted vulnerability (CWE-74, injection/neutralization) rather than an inflated high-CVSS score, but its real-world urgency is moderate and conditional. The input CVSS of 8.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects network reach with no authentication but high attack complexity - the complexity is justified because exploitation depends on the application passing attacker-influenced values into the connection string, and several sub-issues require specific multibyte encodings (GBK/Big5/SJIS), oversized UTF-8 strings (>32767 bytes via the wide APIs), or Windows/MSDTC configuration. EPSS is not provided in the input, KEV status is absent (not listed), and no POC or working exploit is referenced - only the vendor GHSA advisory and changelog. The vendor/aggregator Decision label is 'this_week', which aligns with a serious-but-not-emergency triage: patch promptly, but there is no evidence of active exploitation. The most severe outcome (stack buffer overflow in the MSDTC/XA-loading process) is narrower than the connection-string injection, which more broadly lets an end user redirect the application to a server of their choosing. Net: a real priority for anyone running psqlODBC in apps that embed user-supplied values into connection strings, but not confirmed as widespread active exploitation. |
| Exploit ScenarioDerived | An application lets an end user supply a password (or similar value) that it places into a psqlODBC connection string. The user embeds a crafted multibyte or brace-escaped value so the trailing 0x7d of a GBK/Big5/SJIS character or an escaped '}}' prematurely ends the braced value, letting the remainder be parsed as additional connection keywords that point the application at an attacker-controlled PostgreSQL server. On Windows with MSDTC, an overlong password/username passed unescaped into the XA open string overflows a 64-byte stack buffer in the XA-library-loading process; no public exploit code is referenced at the time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
psqlODBC through 18.00.0006 parses and rebuilds connection strings in several ways that let an attacker-influenced value - a password, user name, or any other field the host application interpolates - break out of its braced value and inject additional connection keywords, which can redirect the application to a server the attacker controls. The same parsing flaws provide a stack-overflow path: on Windows with MSDTC the unescaped XA open string is copied into a 64-byte stack buffer in the process that loads the XA library, and percent-encoding a long password writes one byte past a 4096-byte stack buffer. Exploitation is conditional on the host application placing an end-user-controlled value into the connection string, is high-complexity per the CVSS vector (AV:N/AC:H/PR:N/UI:N), and no public exploit has been identified at time of analysis; the vendor advisory is GHSA-7638-f7xp-wv22.
RemediationAI
Upgrade psqlODBC past 18.00.0006 - that version is the last one named as affected, and the fixed build is the next release published on the project changelog at https://odbc.postgresql.org/changelog/; consult the vendor advisory https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-7638-f7xp-wv22 for the exact fixed version, which is not stated in the data available here. Because every issue in this set is only reachable when an end-user-supplied value becomes part of the connection string, the most effective structural control is to stop interpolating untrusted input into connection strings at the application layer and supply credentials through a mechanism the user cannot influence; the trade-off is that this requires application changes rather than a driver update. Where that is not immediately possible, scope the residual risk to the confirmed preconditions: the brace-parsing defects need GBK, Big5 or SJIS multibyte values ending in byte 0x7d or a braced value ending right after an escaped '}}', so avoiding braced values in non-ASCII multibyte encodings removes that trigger at the cost of restricting how credentials may be expressed; the truncation issue requires the SQLConnectW, SQLDriverConnectW or SQLBrowseConnectW entry points with a connection string whose UTF-8 form exceeds 32767 bytes, so keeping strings under that limit or using the ANSI entry points avoids it; the stack overflow in the XA library only applies to Windows hosts with MSDTC configured, so deferring or disabling MSDTC-based distributed transactions on those systems removes that path while giving up distributed transaction support. The decision signal here is this_week rather than act_now, and no public exploit has been identified at time of analysis, so remediation can be scheduled into the current patch cycle rather than treated as an emergency.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause class is CWE-74 (improper neutralization of special elements in output used by a downstream component), realized here in psqlODBC's connection-string lexer and builder. Four distinct parsing defects are described. First, inside a braced value such as PWD={…} the parser tests bytes individually, so in GBK, Big5 or SJIS multibyte encodings a character whose trailing byte is 0x7d is mistaken for the closing brace, ending the value early. Second, a braced value that terminates immediately after an escaped '}}' is not reported as unterminated, so the remaining contents are reinterpreted as further keywords. Third, the wide entry points SQLConnectW(), SQLDriverConnectW() and SQLBrowseConnectW() truncate a connection string whose UTF-8 expansion exceeds 32767 bytes, silently altering how everything after the cut is parsed. Fourth, two memory-safety issues accompany the logic bugs: on Windows with MSDTC the password and user name are placed into the XA open string without escaping and the XA library then copies each item into a fixed 64-byte stack buffer, and percent-encoding a long password writes one byte beyond a 4096-byte stack buffer. The wide-API truncation requires the W variants and a string above the 32767-byte UTF-8 threshold; the brace issues require the specific multibyte encoding or the escaped-brace layout; the overflow paths require the long-password or Windows/MSDTC deployments respectively. The CPE cpe:2.3:a:postgresql:psqlodbc:*:*:*:*:*:*:*:* covers all releases up to and including 18.00.0006.
Know when Psqlodbc gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
AV:N and PR:N/UI:N because an unauthenticated end user supplies the tainted value; AC:H because exploitation depends on specific multibyte encodings, oversized strings, or Windows/MSDTC configuration; C/I/A:H from connection redirection and the stack overflow.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
DescriptionCVE.org
psqlODBC parsed and built connection strings in ways that let a value end early:
- In a braced value, such as PWD={…}, a trailing byte 0x7d of a GBK, Big5 or SJIS character was taken for the closing brace.
- A braced value that ended right after an escaped }} was not reported as unterminated, and its contents were parsed as further keywords.
- SQLConnectW(), SQLDriverConnectW() and SQLBrowseConnectW() cut a connection string whose UTF-8 form is longer than 32767 bytes, which changes how the rest of it is parsed.
- On Windows with MSDTC, the password and user name were put into the XA open string without escaping, and the XA library copied each item of that string into a 64-byte stack buffer.
- Percent-encoding a long password wrote one byte past a 4096-byte stack buffer.
An end user who supplies a password, or another value the application puts into the connection string, can set other connection keywords, for example to connect the application to a server of their choosing. The MSDTC case can also overflow a stack buffer in the process that loads the XA library.
Versions up to and including psqlODBC 18.00.0006 are affected.
Articles & Coverage 2
Technical POC Analysis
The primary bug class is CWE-74, improper neutralization of special elements used by a downstream parser, with CWE-121 (stack-based buffer overflow) and CWE-197 (numeric truncation) as secondary weak…
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The psqlODBC driver, used by many applications to connect to PostgreSQL databases, contains high-severity connection-string parsing flaws that could allow an attacker to redirect database connections to a malicious server or crash the application. This affects any system where end-user input is incorporated into connection strings, potentially exposing sensitive data or causing service disruptions. Leadership should prioritize remediation because databases are core to business operations and customer trust.
No vendor-released patch identified at time of analysis. Interim mitigations include: rigorously validate and sanitize all end-user-supplied values before inclusion in connection strings; avoid dynamic connection string construction from untrusted input; on Windows with MSDTC, disable XA transactions if not essential or ensure the XA open string is properly escaped; monitor application logs for stack overflow crashes or unexpected connection redirections; consider using a different PostgreSQL ODBC driver until a patch is available.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Affected Products (CPE)CVE.org
SQL injection in psqlODBC up to and including 18.00.0006 lets remote unauthenticated attackers run SQL with the applicat
SQL injection in psqlODBC through 18.00.0006 lets an attacker who controls a bound character parameter or a name passed
Heap corruption in psqlODBC through 18.00.0006 can crash an application or corrupt its memory when it processes attacker
Extreme sizes and counts handled without range checks in psqlODBC's driver core let 16-bit counters and 2 GiB-scale size
Heap corruption and driver crashes in psqlODBC (all versions up to and including 18.00.0006) stem from the driver not ve
SQL injection in psqlODBC through crafted database, schema, table, column, operator, cursor, or parameter identifiers ca
A client-side memory-corruption flaw in the PostgreSQL ODBC driver (psqlODBC) through 18.00.0006 causes the driver to wr
Memory-safety defects across several code paths in psqlODBC, the PostgreSQL ODBC driver, allow a hostile or compromised
Out-of-bounds reads and writes in psqlODBC before 18.00.0006 arise when a host application forwards untrusted column num
SQL injection in psqlODBC before 18.00.0006 allows an attacker who can influence a table or schema name passed by a host
A stack-based buffer overflow (CWE-121) in the psqlODBC driver, the official PostgreSQL ODBC driver, lets attacker-influ
Heap out-of-bounds write in the psqlODBC driver (CWE-787) affects all versions before 18.00.0006 and is reachable only w
NVD
CVE.org
EPSS
GitHub
Exploit-DB