Skip to main content

psqlODBC EUVDEUVD-2026-115371

| CVE-2026-120058 HIGH
Out-of-bounds Write (CWE-787)
2026-11-02 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
    Position as untrusted/malicious PostgreSQL server
  2. Delivery
    Victim client connects with UseDeclareFetch enabled
  3. Exploit
    Send first result establishing small column count
  4. Execution
    Answer later FETCH with more columns (or keyset with fewer than key fields)
  5. Persist
    Driver writes tuple records past heap allocation
  6. Impact
    Out-of-bounds heap write / memory corruption

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

Exploitation requires (1) the psqlODBC driver configured with the UseDeclareFetch option enabled - the vulnerable cursor/FETCH path is explicitly reachable only in that mode; and (2) the client connecting to a PostgreSQL server that is 'not trusted under current SSL settings,' meaning an attacker must operate or impersonate the backend (a malicious server or MITM where SSL trust is not enforced). The trigger is a malicious server answering a later FETCH with more columns than the first result (heap over-write), or a keyset reply with fewer columns than the key fields (unsigned field-count underflow). LIMITING FACTORS: per the CVSS vector, user interaction is required (UI:R) because a victim must initiate the vulnerable cursor connection, and attack complexity is high (AC:H) because the attacker must already be in a trusted-server or MITM position; deployments that enforce strong SSL/TLS server verification and that do not enable UseDeclareFetch are not exposed.

Impact

This is a genuine memory-corruption vulnerability (CWE-787, out-of-bounds write) but one whose real-world risk is tempered by its unusual threat model rather than a straightforward high-CVSS remote bug. The supplied CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H, 7.5) encodes the key frictions: AC:H and UI:R mean exploitation is not a simple remote hit - it requires a victim to initiate a connection and an attacker positioned as a PostgreSQL server that is 'not trusted under current SSL settings,' i.e. a malicious or impersonated backend (MITM or rogue server). PR:N (unauthenticated) is correct in the sense that the server side needs no client credentials. The decision label is 'this_week' (vuln.today), which signals prompt but not emergency handling, consistent with a serious-but-conditional flaw. CRITICAL DATA GAPS: no EPSS score is provided, so exploitation probability cannot be quantified; the CVE is NOT in CISA KEV, so there is no evidence of active exploitation; and the sole reference is a GitHub security advisory, not a published proof-of-concept. These signals are coherent rather than conflicting - high technical impact but a constrained trigger (malicious-server + UseDeclareFetch) - so this warrants timely patching for environments using psqlODBC against untrusted or network-reachable servers, but it is not a drop-everything internet-wide worm candidate.

Exploit ScenarioDerived

An attacker who can impersonate or substitute a PostgreSQL server (for example via a MITM when SSL trust is weak, or by luring a client to connect to a rogue backend) waits for a psqlODBC client with UseDeclareFetch enabled to run a cursor query. After the first result sizes the driver's row cache, the attacker answers a later FETCH with more columns than the first reply, causing the driver to write tuple records past the end of the heap allocation. No public exploit identified at time of analysis; only a vendor security advisory is referenced.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

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

Alert me

AnalysisAIv1 – Nov 02, 2026

Heap out-of-bounds write in the psqlODBC driver (CWE-787) affects all versions before 18.00.0006 and is reachable only when the UseDeclareFetch option is enabled. The driver sizes its row cache from the column count of a cursor's first result, then accepts a different column count from later FETCH replies; a PostgreSQL server that is not trusted under the current SSL settings can return extra columns and drive writes past the end of the heap allocation, with a keyset reply containing fewer columns than the key fields also causing an unsigned field-count underflow. Unauthenticated remote attackers can exploit this only from a malicious or impersonated backend position, requiring user interaction (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H, 7.5); no public exploit code and no confirmed active exploitation were identified at time of analysis, and the vendor-released fix is 18.00.0006.

RemediationAI

Upgrade psqlODBC to 18.00.0006 or later - the vendor-released patch that fixes the row-cache sizing and keyset field-count handling - and follow the advisory at https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-6rmx-9q62-4w6m. Where upgrading immediately is not possible, remove the two preconditions the advisory identifies: disable the UseDeclareFetch connection option so the vulnerable cursor/FETCH path is never taken (trade-off: the driver materializes result sets up front instead of streaming them, which increases client memory use for large result sets and changes cursor behaviour for applications that rely on it), and enforce strong SSL/TLS server verification so an untrusted or impersonated backend cannot return a hostile FETCH reply (trade-off: deployments with self-signed or unmanaged server certificates will fail to connect until those certificates are properly issued and trusted). Because the flaw is only reachable from a server outside the current SSL trust boundary, neither mitigation is a substitute for applying 18.00.0006.

Affected VersionsENISA

psqlODBC 0 <18.00.0006

Affected Packages

euvd psqlodbc fix: 18.00.0006

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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 ODBC driver for PostgreSQL, implemented as a C library that speaks the PostgreSQL frontend/backend wire protocol. When UseDeclareFetch is enabled, the driver declares a server-side cursor and streams results with FETCH messages rather than retrieving an entire result set up front. For this path the driver allocates a row cache sized from the column count of the cursor's first result set, but it recomputes the column count from each subsequent FETCH reply without validating that it matches the original. A backend that returns more columns than the initial result causes tuple records to be written beyond the end of the heap allocation - the classic CWE-787 out-of-bounds write. A parallel defect exists in keyset handling: a reply with fewer columns than the key fields underflows the unsigned field count, which can similarly corrupt memory. Because the defect lives in the driver's client-side result parsing, the trust boundary that matters is the server identity: the driver only parses a hostile reply when the server is not trusted under the SSL settings in force (for example, certificate verification not enforced, allowing a malicious server or a man-in-the-middle to answer). The CPE cpe:2.3:a:postgresql:psqlodbc:*:*:*:*:*:*:*:* captures the whole pre-18.00.0006 product line as affected.

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 must control/impersonate an SSL-untrusted server (AC:H) and victim must initiate the connection (UI:R); no client credentials needed (PR:N); heap OOB write yields full C/I/A impact.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:A/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

Lifecycle Timeline

2
Patch available
Nov 02, 2026 - 20:18 EUVD
CVE Published
Nov 02, 2026 - 19:09 cve.org
HIGH 7.5

DescriptionCVE.org

psqlODBC sizes its row cache from the column count of a cursor's first result, but recomputes the column count from each later FETCH reply without checking that it matches. A server not trusted under current SSL settings can answer a later FETCH with more columns and make the driver write tuple records past the end of the heap allocation. A keyset reply with fewer columns than the key fields also underflows the unsigned field count. This is reachable with UseDeclareFetch enabled. Versions before psqlODBC 18.00.0006 are affected.

Executive ViewAI

Why It Matters

A high-severity vulnerability in the psqlODBC driver, affecting all versions before 18.00.0006, allows a malicious or impersonated PostgreSQL backend to potentially compromise systems when the UseDeclareFetch option is enabled. This requires user interaction and is not remotely exploitable without a man-in-the-middle position, but successful exploitation could lead to data confidentiality and integrity breaches. Leadership should care because database client software is widely deployed and a compromise could impact sensitive data and trust in database connections.

Business Impact: High
Compensating Controls

Apply vendor patch. If patch cannot be applied immediately, disable UseDeclareFetch and ensure proper SSL certificate validation to mitigate the risk of malicious backend impersonation.

Threat Intelligence Overview

Prevalence
Medium
official PostgreSQL ODBC driver, common but not universal connector
Social Media
1
Sightings
Data Quality
5 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 N/A
Patch available Yes
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

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.

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-120057 HIGH
7.5 Nov 02

A heap buffer overflow in psqlODBC's large-object read path lets a malicious or man-in-the-middle PostgreSQL server over

CVE-2026-120065 HIGH
7.1 Nov 02

SQL injection in psqlODBC before 18.00.0006 can let an authenticated database user who can create a table that an applic

CVE-2026-120059 MEDIUM
6.8 Nov 02

Format-string handling in psqlODBC before 18.00.0006 can crash applications or disclose client memory when an updatable

CVE-2026-109448 MEDIUM
5.9 Oct 12

Heap memory corruption in psqlODBC versions before 18.00.0005 can be triggered when an application binds 32,769 or more

CVE-2026-120067 MEDIUM
5.9 Nov 02

A stack-based buffer overflow in psqlODBC, the PostgreSQL ODBC driver, affects all releases before 18.00.0006 when updat

CVE-2026-120063 MEDIUM
5.9 Nov 02

Stack buffer over-write in psqlODBC before 18.00.0006 can corrupt an application process that forwards attacker-influenc

CVE-2026-120060 MEDIUM
5.9 Nov 02

Client-side crash and limited out-of-bounds read affect psqlODBC before 18.00.0006 when the driver connects to a Postgre

CVE-2026-120066 MEDIUM
5.3 Nov 02

psqlODBC before 18.00.0006 on Unix-like systems can expose query text and data to other local users when logging is enab

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