Skip to main content

psqlODBC CVE-2026-136509

HIGH
Out-of-bounds Write (CWE-787)
2026-11-25 PostgreSQL
7.5
CVSS 3.1 · Vendor: PostgreSQL
View

Attack ChainAIDerived

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

  1. Access
    Compromise server or gain MITM on non-verify-full link
  2. Delivery
    Victim psqlODBC client initiates connection
  3. Exploit
    Return protocol reply violating row/column/result contract
  4. Execution
    Overflow row cache or free in-use results/keysets
  5. Impact
    Crash or heap corruption in client process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The victim application must use psqlODBC to connect to a server the attacker controls or has compromised, OR the attacker must be positioned on the network path of a connection that does not use sslmode=verify-full - and because the driver's default is sslmode=disable, most connections are MITM-exposed unless explicitly hardened. The attacker then returns crafted libpq protocol replies that do not match the query sent (e.g., a FETCH returning more rows than requested, extra result sets, rows with wrong column counts, out-of-range internal values, or replies ending a COPY/transaction/connection at an unexpected point). Several sub-conditions apply to specific bugs: keyset-driven cursors (for the free-while-in-use and extra-column cases), UseDeclareFetch=1 (for the ROLLBACK command-tag case), and Windows-specific paths involving MSDTC/XA transaction recovery or a startup reply missing client_encoding. Limiting factors that reduce realistic risk: the attacker needs a server-side or MITM position (not achievable by an arbitrary remote attacker against a listening service), the victim must initiate the connection (UI:R), using sslmode=verify-full neutralizes the MITM path, and some branches only affect Windows/MSDTC deployments. Impact demonstrated to date is limited to crashes and heap corruption.

Impact

This is a genuine but conditional HIGH-severity issue (CVSS 7.5, CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H). The network vector (AV:N) and lack of authentication (PR:N) look alarming, but AC:H and UI:R are load-bearing: exploitation requires the attacker to either control/compromise the server the client talks to, or sit on the network path of a connection that does not use sslmode=verify-full - and the victim application must initiate that connection. The default sslmode=disable meaningfully widens the man-in-the-middle angle on untrusted networks, which raises real-world risk above a pure 'malicious server only' bug. Countervailing signals: no CISA KEV entry (status: no), no EPSS score is provided in the input (cannot quantify exploitation probability), and no public exploit/PoC is referenced - only a vendor security advisory. The vuln.today decision label is this_week (not act_now/emergency), consistent with a serious-but-not-actively-exploited flaw. Critically, the vendor states only crashes and heap corruption have been demonstrated; code execution has NOT been demonstrated, so the 'RCE' framing is theoretical for CWE-787 here. Net: treat as a real patching priority for environments running psqlODBC against untrusted servers or over networks without sslmode=verify-full, but it is not a mass-exploitation, drive-by internet threat.

Exploit ScenarioDerived

An attacker who operates a malicious PostgreSQL endpoint, or who can intercept a client connection that does not use sslmode=verify-full (the psqlODBC default is sslmode=disable), waits for or lures a victim application using psqlODBC to connect, then returns protocol replies that violate the query contract - for example a FETCH answered with more rows than requested or extra result sets. The mismatched replies overflow the driver's row cache or free results that are still in use, producing a crash or heap corruption in the client process. No public exploit code is identified and code execution has not been demonstrated; AC:H/UI:R reflect the need for a privileged network position and a victim-initiated connection.

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

Heap corruption and driver crashes in psqlODBC (all versions up to and including 18.00.0006) stem from the driver not verifying that server replies match the query it sent, so a hostile or compromised PostgreSQL server - or anyone positioned on the network path of a connection that does not use sslmode=verify-full, noting the driver default is sslmode=disable - can overflow row caches, free results still in use, dereference missing rows/columns, write past buffers with a malformed relacl value, and loop or crash on replies that end a COPY, transaction or connection at an unexpected point. Separate branches affect eight Unicode entry points that omit the null terminator when a value does not fit the caller's buffer, Windows start-up replies lacking client_encoding, MSDTC/XA recovery with a long transaction name, and the SQLSTATE string returned by SQLGetDiagRecW(). The assessed severity is HIGH (CVSS 7.5, CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H); demonstrated results are crashes and heap corruption, code execution has not been demonstrated, no public exploit was identified at time of analysis, and the issue continues the fixes for CVE-2026-120058 and CVE-2026-120060 which addressed other reply types.

RemediationAI

Upgrade psqlODBC to a release later than 18.00.0006 as identified in the vendor advisory https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-98mx-57hv-xjpr and the changelog https://odbc.postgresql.org/changelog/ (the available data names 18.00.0006 as the last affected version but does not state the exact fixed release number, so confirm the patched build before rollout). Because the flaws are inside the driver's protocol parsing, a driver update is the only fix for the compromised-server path; configuration changes only remove specific attack paths and each has trade-offs. Setting sslmode=verify-full eliminates the man-in-the-middle vector by authenticating the server certificate, but requires a trusted CA chain, correct server certificates and hostname verification, and it breaks self-signed or misconfigured deployments that currently rely on the default sslmode=disable. Avoiding keyset-driven cursors and disabling UseDeclareFetch=1 removes the cursor and command-tag code paths, at the cost of changed application behaviour and degraded large-result-set performance. On Windows, restricting MSDTC/XA distributed transactions to trusted servers avoids the recovery-path overflow and the XA use-after-free but limits distributed transaction support, and applications should not treat error text from untrusted servers as safe until SQLGetDiagRecW() termination is fixed. None of these compensating controls protect an application that connects to a server an attacker already controls.

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

psqlODBC is the official PostgreSQL ODBC driver and speaks the libpq frontend/backend wire protocol directly, parsing RowDescription, DataRow, CommandComplete and CopyOutResponse messages into internal row caches, keysets and catalog structures. The root cause class is CWE-787 (out-of-bounds write) compounded by CWE-476/CWE-416-style dereference and use-after-free behaviour: the driver trusts server-supplied counts and boundaries instead of validating them against the request it issued - a FETCH returning more rows than asked for overflows the row cache, extra results in reply to a FETCH or to keyset-driven cursor key queries are freed while still referenced, a key query answered with extra columns or a re-read row with fewer columns overflows the cache, and internal connect-time and catalog queries are dereferenced when replies carry no columns, no rows or NULLs. Value validation is likewise missing for empty column names, parameter counts, large-object sizes, function/trigger argument counts, a result of exactly 32767 columns, and relacl in SQLTablePrivileges(), which writes past a buffer; on Windows with MSDTC a long server-returned transaction name overflows a recovery buffer. Protocol-termination assumptions add further faults: a CopyOutResponse followed by a lost connection, a ROLLBACK command tag under UseDeclareFetch=1, a lost connection while closing a cursor with positioned updates, and eight extra bytes in a reply that strand the driver waiting for a COPY to end all leave freed results, keysets or table information in use. The assessed prerequisites are that the victim's application connects through psqlODBC to an attacker-controlled or compromised server, or that the attacker sits on the network path of a connection lacking sslmode=verify-full; the victim must initiate the connection (UI:R), and several branches only apply to keyset-driven cursors, UseDeclareFetch=1, or Windows/MSDTC deployments.

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 7.5 HIGH
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.5 HIGH

Attacker needs a malicious/compromised server or MITM on a non-verify-full link (AC:H) and a victim-initiated connection (UI:R); no auth (PR:N); memory corruption plus memory leakage yield C/I/A:H.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/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
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

psqlODBC did not check that a server reply matches the query it sent: that a FETCH returns no more rows than it asked for, that each row has the described number of columns, that one query produces one result, and that a COPY, a transaction or the connection ends where the protocol says. By sending replies that do not match, a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable) can corrupt memory in the application:

  • A FETCH reply with more rows than requested overflows the row cache.
  • Extra results in reply to a FETCH, or to the queries of a keyset-driven cursor, are freed while still in use.
  • A key query of a keyset-driven cursor answered with extra columns, or a re-read row with fewer columns, overflows the row cache.
  • Replies without columns or rows, or with NULL values, to the driver's internal queries at connect time and in catalog functions are dereferenced.
  • A malformed relacl value in SQLTablePrivileges() makes the driver write past a buffer.
  • On Windows with MSDTC, a long transaction name returned by the server overflows a buffer during recovery.
  • Values in replies to the driver's internal queries are used without checking their range: an empty column name, a parameter count, a large-object size, a function's or trigger's argument count, and a result of exactly 32767 columns. They are dereferenced, read past, returned to the application or sent back to the server as stack memory, or make the driver loop forever.
  • A reply that ends a COPY, the connection or the transaction at an unexpected point leaves freed results, keysets or table information in use: a CopyOutResponse followed by a lost connection, a ROLLBACK command tag under UseDeclareFetch=1, or a lost connection while a cursor with positioned updates is closed. Eight extra bytes in a reply also make the driver wait forever for a COPY to end.
  • On Windows, a start-up reply without client_encoding crashes the driver, and with MSDTC a failed connection makes the XA library use a connection it has already freed.
  • An error message ending in the first byte of a multibyte character leaves the SQLSTATE returned by SQLGetDiagRecW() unterminated.
  • When a string value did not fit the application's buffer, eight Unicode entry points filled the buffer and wrote no null terminator, so a caller that reads to the terminator, as ODBC allows, read past the end of its own buffer.

This continues the fixes for CVE-2026-120058 and CVE-2026-120060, which covered other replies. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated.

Versions up to and including psqlODBC 18.00.0006 are affected.

Technical POC Analysis

CWE-787 (Out-of-bounds Write) is the primary class assigned; the same advisory also tags the cluster CWE-416 (Use After Free) and CWE-476 (NULL Pointer Dereference), because the underlying defect is…

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

CVE-2026-136509 in psqlODBC (up to 18.00.0006) allows a hostile or compromised PostgreSQL server, or a network attacker on non-verified connections, to crash or corrupt client applications using the driver, with potential for data integrity and confidentiality loss. This affects any business unit or customer-facing service relying on psqlODBC for database connectivity, with medium operational impact due to required user interaction and high attack complexity.

Business Impact: Medium
Compensating Controls

Apply vendor patch: 18.00.0007

Threat Intelligence Overview

EPSS Score
0.5%
Top 68% exploitable
Prevalence
Medium
official PostgreSQL ODBC driver; common in enterprise/Windows apps but one of several connectors
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
Medium

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
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.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

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

psqlODBC through 18.00.0006 parses and rebuilds connection strings in several ways that let an attacker-influenced value

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