Skip to main content

psqlODBC CVE-2026-136515

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
    Supply crafted SQL to psqlODBC-backed app
  2. Delivery
    Open on keyset/dynamic non-read-only cursor
  3. Exploit
    Driver rewrites using invalid text positions
  4. Execution
    Out-of-bounds heap write corrupts memory
  5. Impact
    Application crashes (denial of service)

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 application must open the attacker-supplied statement on a keyset-driven or dynamic cursor with a concurrency setting other than read-only, OR invoke it with an output parameter (e.g. {fn CONVERT(?, …)} or {? = call …}); specific triggers include a prior failed SQLExecDirect() on the same handle, malformed or unclosed {fn …} escapes, {fn …} arguments containing FOR UPDATE/;/INTO … FROM, deeply nested {fn …} escapes, or @@identity translation. The attacker must control the SQL statement text, which is the case for query tools, report builders, and apps that run SQL their users type. Limiting factors: default read-only/forward-only cursors are not affected, so the specific updatable cursor concurrency or output-parameter usage is a non-default precondition (reflected in AC:H); authentication requirements are those of the host application rather than the driver.

Impact

Signals point to a moderate, configuration-gated priority rather than a top-tier emergency. The provided CVSS 3.1 base vector is AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H (7.5), but AC:H and PR:L already reflect that exploitation needs a specific, non-default cursor configuration and an actor able to supply SQL text. EPSS is not supplied, so exploitation probability cannot be quantified. The CVE is not listed in CISA KEV and no public exploit is identified, so there is no evidence of active exploitation. The vuln.today decision label is 'this_week' (not act_now/emergency), consistent with patch-this-week urgency rather than drop-everything. Note a discrepancy: the input C:H/I:H in the CVSS vector and the 'RCE' tag imply code execution, yet the vendor description explicitly states 'Code execution has not been demonstrated' - the demonstrated impact is heap corruption and application crash (denial of service). Treat the confidentiality/integrity worst case as unverified potential, not confirmed fact; the realistic priority is a reliable DoS against affected query/reporting tools, patched on a normal weekly cadence.

Exploit ScenarioDerived

A user of a query tool, report builder, or similar application that runs user-supplied SQL through psqlODBC opens a crafted statement on a keyset-driven or dynamic cursor with a concurrency other than read-only (or calls it with an output parameter). The driver rewrites the statement using positions that lie outside the text or belong to a different statement, performing an out-of-bounds/negative-length copy that corrupts the heap and terminates the application. No public exploit is identified and code execution has not been demonstrated; AC:H reflects the required non-default cursor configuration.

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 in psqlODBC through 18.00.0006 can crash an application or corrupt its memory when it processes attacker-controlled SQL text on a keyset-driven or dynamic cursor with non-read-only concurrency, or when output parameters are used. The flaw arises from statement-rewrite position tracking in the driver: failed SQLExecDirect calls, malformed or nested {fn ...} escapes, @@identity translation, and {? = call ...} with unbound return values can cause out-of-bounds writes, negative lengths, stack exhaustion, or NULL dereference. The assessed impact is low integrity and high availability with no confidentiality impact; code execution has not been demonstrated, and no public exploit was identified at time of analysis.

RemediationAI

Apply the fixed psqlODBC release referenced in the vendor advisory (GHSA-pw7w-x92p-r3q2) and changelog (https://odbc.postgresql.org/changelog/); versions up to and including 18.00.0006 are affected. As a compensating control, avoid opening attacker-controlled SQL on keyset-driven or dynamic cursors with non-read-only concurrency and avoid output-parameter forms such as {fn CONVERT(?, ...)} and {? = call ...} with untrusted text, since default read-only/forward-only cursors are unaffected. These restrictions reduce exposure but may break applications that rely on updatable cursors or output parameters.

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, and the affected CPE is cpe:2.3:a:postgresql:psqlodbc. The root cause is CWE-787 out-of-bounds write in the driver's statement-text rewriting logic for keyset-driven cursors and ODBC escape sequences. The driver records FROM and WHERE positions while parsing SQL, then reuses those positions to rewrite the statement; when the positions are stale, out of range, or refer to a different statement, the rewrite can copy negative lengths or write outside the intended buffer. Specific triggers include a prior failed SQLExecDirect on the same handle, a FROM position with no trailing text, {fn ...} arguments containing FOR UPDATE, semicolons, or INTO ... FROM, {fn CONVERT(?, ...)} with output parameters, unclosed or thousands of nested {fn ...} escapes, @@identity translation in long statements reading an uninitialised pointer, and {? = call ...} dereferencing NULL when no return value is bound. The assessed vector is CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H, reflecting a non-default precondition (updatable keyset/dynamic cursor or output-parameter use) and authentication inherited from the host application. Exploitation requires the attacker to control SQL statement text, as in query tools, report builders, and applications that run user-supplied SQL.

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:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 5.9 MEDIUM

Requires a non-default updatable cursor config plus attacker-controlled SQL (AC:H, PR:L); only application crash is demonstrated (A:H), the out-of-bounds write gives limited integrity impact, and no disclosure is shown (C:N).

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

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

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

DescriptionCVE.org

psqlODBC rewrites statement text for keyset-driven cursors and ODBC escapes using positions it found in the text. These positions could lie outside the text or describe another statement:

  • After SQLExecDirect() failed on a statement handle, the FROM and WHERE positions of the failed statement were applied to the next, shorter statement on that handle.
  • The parser could record a FROM position with no text after it, and the rewrite then copied a negative length.
  • An {fn …} escape whose arguments contain FOR UPDATE, ; or INTO … FROM made the driver remove a cursor prefix from the wrong buffer.
  • {fn CONVERT(?, …)} with an output parameter produced a negative argument length.
  • An unclosed {fn …} escape made the driver read past the statement, and a few thousand nested ones exhausted the stack.
  • Translating @@identity in long statement text read an uninitialised pointer, and {? = call …} with nothing bound for the return value dereferenced NULL.

Whoever supplies the text of a statement that an application opens on a keyset-driven or dynamic cursor with a concurrency other than read-only, or calls with an output parameter, can corrupt the application's heap and end it. That includes the users of query tools, report builders and other applications that run SQL their users type. 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 headline class, but the advisory scores the issue as a cluster of memory-safety defects and lists three weaknesses together: CWE-787, CWE-125 (out-of-bounds read)…

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-136515 is a heap corruption vulnerability in the psqlODBC driver (up to version 18.00.0006) that can crash or corrupt memory in applications using it. This affects any system where applications connect to PostgreSQL via ODBC and process untrusted SQL, potentially causing service outages that impact business operations. Leadership should prioritize patching or mitigation to maintain availability of critical database-dependent applications.

Business Impact: High
Compensating Controls

Restrict SQL input to trusted sources, validate and sanitize all SQL text, use read-only cursors where possible, implement application-level exception handling to prevent crashes, monitor for anomalous database activity, and consider network segmentation to limit exposure.

Threat Intelligence Overview

EPSS Score
0.5%
Top 62% exploitable
Prevalence
Medium
official PostgreSQL ODBC driver, common in BI/reporting apps, 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.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

39
Low Medium High Critical
KEV: 0
EPSS: +1
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-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