psqlODBC
CVE-2026-136515
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted SQL to psqlODBC-backed app
-
DeliveryOpen on keyset/dynamic non-read-only cursor
-
ExploitDriver rewrites using invalid text positions
-
ExecutionOut-of-bounds heap write corrupts memory
-
ImpactApplication 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
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).
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
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.
Articles & Coverage 2
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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
psqlODBC through 18.00.0006 parses and rebuilds connection strings in several ways that let an attacker-influenced value
SQL injection in psqlODBC up to and including 18.00.0006 lets remote unauthenticated attackers run SQL with the applicat
SQL injection in psqlODBC through 18.00.0006 lets an attacker who controls a bound character parameter or a name passed
Extreme sizes and counts handled without range checks in psqlODBC's driver core let 16-bit counters and 2 GiB-scale size
Heap corruption and driver crashes in psqlODBC (all versions up to and including 18.00.0006) stem from the driver not ve
SQL injection in psqlODBC through crafted database, schema, table, column, operator, cursor, or parameter identifiers ca
A client-side memory-corruption flaw in the PostgreSQL ODBC driver (psqlODBC) through 18.00.0006 causes the driver to wr
Memory-safety defects across several code paths in psqlODBC, the PostgreSQL ODBC driver, allow a hostile or compromised
Out-of-bounds reads and writes in psqlODBC before 18.00.0006 arise when a host application forwards untrusted column num
SQL injection in psqlODBC before 18.00.0006 allows an attacker who can influence a table or schema name passed by a host
A stack-based buffer overflow (CWE-121) in the psqlODBC driver, the official PostgreSQL ODBC driver, lets attacker-influ
Heap out-of-bounds write in the psqlODBC driver (CWE-787) affects all versions before 18.00.0006 and is reachable only w
NVD
CVE.org
EPSS
GitHub
Exploit-DB