Skip to main content

psqlODBC CVE-2026-136507

HIGH
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-11-25 PostgreSQL
8.1
CVSS 3.1 · Vendor: PostgreSQL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted value via application input
  2. Delivery
    Smuggle extra connection keywords using brace/charset escape
  3. Exploit
    Redirect application to attacker-controlled server
  4. Execution
    (MSDTC path) overflow 64-byte XA open-string stack buffer
  5. Impact
    Execute 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Vendor (PostgreSQL) PRIMARY 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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.

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.5%
Top 65% exploitable
Prevalence
Medium
official PostgreSQL ODBC driver, common in ODBC-based PostgreSQL integrations, notably on Windows
Social Media
1
Sightings
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:postgresql:psqlodbc:*:*:*:*:*:*:*:*
CVE-2026-136502 HIGH
8.1 Nov 25

SQL injection in psqlODBC up to and including 18.00.0006 lets remote unauthenticated attackers run SQL with the applicat

CVE-2026-136500 HIGH
8.1 Nov 25

SQL injection in psqlODBC through 18.00.0006 lets an attacker who controls a bound character parameter or a name passed

CVE-2026-136515 HIGH
7.5 Nov 25

Heap corruption in psqlODBC through 18.00.0006 can crash an application or corrupt its memory when it processes attacker

CVE-2026-136505 HIGH
7.5 Nov 25

Extreme sizes and counts handled without range checks in psqlODBC's driver core let 16-bit counters and 2 GiB-scale size

CVE-2026-136509 HIGH
7.5 Nov 25

Heap corruption and driver crashes in psqlODBC (all versions up to and including 18.00.0006) stem from the driver not ve

CVE-2026-136506 HIGH
7.5 Nov 25

SQL injection in psqlODBC through crafted database, schema, table, column, operator, cursor, or parameter identifiers ca

CVE-2026-136512 HIGH
7.5 Nov 25

A client-side memory-corruption flaw in the PostgreSQL ODBC driver (psqlODBC) through 18.00.0006 causes the driver to wr

CVE-2026-136503 HIGH
7.5 Nov 25

Memory-safety defects across several code paths in psqlODBC, the PostgreSQL ODBC driver, allow a hostile or compromised

CVE-2026-120064 HIGH
7.5 Nov 02

Out-of-bounds reads and writes in psqlODBC before 18.00.0006 arise when a host application forwards untrusted column num

CVE-2026-120062 HIGH
7.5 Nov 02

SQL injection in psqlODBC before 18.00.0006 allows an attacker who can influence a table or schema name passed by a host

CVE-2026-120061 HIGH
7.5 Nov 02

A stack-based buffer overflow (CWE-121) in the psqlODBC driver, the official PostgreSQL ODBC driver, lets attacker-influ

CVE-2026-120058 HIGH
7.5 Nov 02

Heap out-of-bounds write in the psqlODBC driver (CWE-787) affects all versions before 18.00.0006 and is reachable only w

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy