Skip to main content

psqlODBC CVE-2026-136512

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
    Control server or MITM non-verify-full connection
  2. Delivery
    Report mismatched/larger column type at fetch
  3. Exploit
    Driver writes oversized value into undersized buffer
  4. Execution
    Corrupt heap or stack memory in client
  5. Impact
    Hijack control flow for code execution on client

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 that the victim application binds columns or parameters as SQL_C_DEFAULT (so the C type follows the SQL type) and then encounters a type mismatch at fetch time - the server reports a different/larger type, the table was altered, or an output parameter's result column differs - e.g. a uuid written into a 4-byte buffer (12 bytes overflow), amplified in multi-row array fetches where the driver also strides by the larger size. Variant triggers: int8 fetched under a smaller Int8As setting, an int2vector column, an output parameter bound to a NULL buffer (stack overflow), SQLGetData() with BufferLength 0 on a large-object column (one-byte NUL overflow), or SQLBulkOperations(SQL_ADD) on a static updatable cursor before first fetch followed by modify/rollback/fetch (heap corruption via bad free). The attacker must be a hostile or compromised server, a network man-in-the-middle on a connection NOT using sslmode=verify-full (default is disable, which permits this), or the owner of a table the application reads. Limiting factors (consistent with AC:H and UI:R): the application must actually perform the vulnerable bind/fetch, a specific type-mismatch or cursor condition must be arranged, and connections already hardened with sslmode=verify-full block the MITM vector though not the malicious-server or table-owner vectors.

Impact

The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H, base 7.5) describes a client-side memory-corruption flaw in the psqlODBC driver rather than a server-side service vulnerability, which materially changes how the signals should be read. AC:H and UI:R are the dominant limiting factors: exploitation needs a specific trigger condition (a column/parameter C type derived from SQL_C_DEFAULT that no longer matches the buffer the application sized at describe time, an Int8As/int2vector/NULL-buffer/large-object edge case, or a specific SQLBulkOperations cursor sequence) AND the victim application must actually perform the connection or fetch. The attacker position is not a remote internet attacker in the usual sense but a hostile or compromised PostgreSQL server, a network man-in-the-middle on a connection that does not use sslmode=verify-full (the driver default is disable, so this is realistic), or the owner of a table the application reads. The vuln.today decision label is 'this_week' (not act_now/emergency), consistent with no CISA KEV entry and no EPSS score being supplied. No EPSS probability, no KEV status, and no confirmed proof-of-concept were provided - there is only a GHSA security advisory and a changelog reference, which are vendor documentation, not exploit code. So this is a genuinely high-severity memory-corruption issue (C/I/A all High, CWE-787 out-of-bounds write) but one whose real-world exploitation is gated on a MITM-capable or server-controlling adversary and a vulnerable application data path, not mass remote exploitation; EPSS and KEV data are absent, so widespread active exploitation is neither confirmed nor implied.

Exploit ScenarioDerived

An application using psqlODBC connects to a PostgreSQL server over a connection that does not enforce sslmode=verify-full; an attacker who controls or has interposed on that server returns a column whose actual type is larger than the type the application was told at describe time (for example a uuid against a 4-byte buffer), causing the driver to write 12 bytes past the application's buffer and corrupt adjacent memory. Alternatively, the owner of a table the application reads alters its schema or crafts rows to trigger the Int8As, int2vector, NULL-output-parameter, large-object, or SQLBulkOperations(SQL_ADD) rollback path. No public exploit code was identified at time of analysis; the GHSA advisory documents the flaw but is not verified working exploit code, and AC:H means a specific type-mismatch or cursor condition must be arranged.

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

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

Alert me

AnalysisAIv1 – Nov 25, 2026

A client-side memory-corruption flaw in the PostgreSQL ODBC driver (psqlODBC) through 18.00.0006 causes the driver to write data larger than the buffer an application allocated when column or parameter types reported at describe time differ from the actual type at fetch time; the original report documents a 12-byte overflow past a 4-byte buffer for a uuid and larger corruption in multi-row array fetches, plus several additional out-of-bounds writes across other conversion paths, a stack overflow on a NULL-bound output parameter, and a heap corruption via a bad free in SQLBulkOperations(SQL_ADD) keyset bookkeeping. Triggering the flaw requires the application to bind as SQL_C_DEFAULT and then hit a specific type mismatch or cursor condition, and requires a hostile or compromised server, an on-path attacker on a connection without sslmode=verify-full (the default is disable), or the owner of a table the application reads. CVSS 3.1 scores it 7.5 (AV:N/AC:H/PR:N/UI:R) with high confidentiality, integrity and availability impact; no public exploit code and no confirmed active exploitation were identified at time of analysis.

RemediationAI

No fixed release version is stated in the available sources; consult the vendor advisory at https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-c66p-8p63-p7mr and the changelog at https://odbc.postgresql.org/changelog/ to identify the corrected psqlODBC build for your branch and upgrade from the affected range (through 18.00.0006). Because the flaw lives in the client driver rather than the server, server-side patching does not remove the exposure. As compensating controls, connections should be configured with sslmode=verify-full, which blocks the network on-path vector but does not protect against a hostile or compromised server or against a malicious owner of a table the application reads; applications that cannot upgrade immediately should avoid SQL_C_DEFAULT bindings in favour of explicitly sized buffers matching the expected SQL type, and should be reviewed for SQLGetData() calls with BufferLength 0 on large-object columns and for SQLBulkOperations(SQL_ADD) usage on static updatable cursors before the first fetch, since these are the specific code paths the advisory identifies.

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 PostgreSQL ODBC driver, sitting between an ODBC application and a PostgreSQL server. The root cause class is CWE-787 (out-of-bounds write) and stems from a type-inference design in the driver: with SQL_C_DEFAULT, the C type of a bound column or parameter follows the SQL type the driver is told when the statement is described, and the application sizes its buffer accordingly. When the type changes between describe and fetch - because the server reported a different type, the table was altered, or an output parameter's result column has another type - the driver writes using the larger type into the smaller application buffer. The advisory also describes related conversion defects: Int8As set to a smaller type still writes 8 bytes for an int8 column fetched as SQL_C_DEFAULT; an int2vector column fetched as SQL_C_DEFAULT returns unterminated binary data instead of text; an output parameter discarded by binding a NULL buffer overflows a driver stack buffer; SQLGetData() with BufferLength 0 on a column read as a large object writes a NUL byte past the buffer; and SQLBulkOperations(SQL_ADD) on a static updatable cursor before the first fetch, followed by modifying that row, rolling back and fetching, makes the keyset index arithmetic free a pointer that was never allocated and corrupt the heap. The CVSS AC:H/UI:R ratings reflect that the vulnerable bind/fetch path and a matching type-mismatch or cursor condition must both occur, not any timing or heap-grooming property; the trigger mechanics beyond what the advisory states are not described in the available sources.

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

Client-side out-of-bounds write reachable over the network from a malicious/MITM server (AV:N, PR:N) but needing a specific type-mismatch condition (AC:H) and the application to perform the fetch (UI:R); memory corruption 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: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

With SQL_C_DEFAULT, the C type of a bound column or parameter follows its SQL type. An application sizes its buffer from the type it was told when it described the statement. When the column had another type at fetch time, because the server reported another type, the table was altered, or an output parameter's result column had another type, psqlODBC wrote the larger type into the smaller buffer: 12 bytes past a 4-byte buffer for a uuid, and more in multi-row fetches, where the driver also steps through the array by the larger size.

Other conversions wrote past the application's buffer as well:

  • With Int8As set to a smaller type, an int8 column fetched as SQL_C_DEFAULT was still written as 8 bytes.
  • An int2vector column fetched as SQL_C_DEFAULT returned unterminated binary data instead of text.
  • An output parameter that the application discards by binding a NULL buffer overflowed a stack buffer in the driver.
  • SQLGetData() with BufferLength 0 on a column the driver reads as a large object wrote a NUL byte past the buffer.
  • Adding a row with SQLBulkOperations(SQL_ADD) on a static updatable cursor before the first fetch, then changing that row, rolling back and fetching it, made the keyset index arithmetic free a pointer that was never allocated and corrupt the heap.

This can be triggered by 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), and by the owner of a table the application reads.

Versions up to and including psqlODBC 18.00.0006 are affected.

Technical POC Analysis

Evidence note: the only supplied evidence is advisory GHSA-c66p-8p63-p7mr.

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

A high-severity memory-corruption vulnerability in the PostgreSQL ODBC driver (psqlODBC) affects applications that connect to PostgreSQL databases, potentially allowing an attacker to execute arbitrary code or cause a crash. The flaw requires a hostile server, an on-path attacker, or a malicious table owner, and exploitation depends on specific application binding and type mismatch conditions. Leadership should care because this could lead to data breaches or system compromise in environments using ODBC connections to PostgreSQL, especially where encrypted connections are not enforced.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Enforce sslmode=verify-full to prevent on-path attacks; validate server certificates; restrict table ownership to trusted users; avoid SQL_C_DEFAULT binding where possible; monitor for anomalous database behavior.

Threat Intelligence Overview

EPSS Score
0.4%
Top 72% exploitable
Prevalence
Medium
official PostgreSQL ODBC driver, common data-access connector but not universally deployed
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.4%
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

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.

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