psqlODBC
CVE-2026-136503
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl malicious server or MITM unencrypted connection
-
DeliveryDeliver crafted query reply or notice message
-
ExploitRe-enter commit/rollback clean-up routine
-
ExecutionUse-after-free / double-free in client driver
-
ImpactClient crash and heap corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
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 is largely driven by trusting the server/connection rather than by authenticating: the MITM path requires a connection using an sslmode other than verify-full, and because the default is disable this covers most real deployments. The application must be actively performing work that reaches the vulnerable code - running transactions that commit/rollback, processing libpq notice callbacks, or fetching result rows (UI:R). Several cases are configuration-gated: the multi-cursor free requires FetchRefcursors=1 or UseDeclareFetch=1; the updatable-cursor keyset and stale-callback cases require UseDeclareFetch=1; the statement-parser double-free requires a process named sqlservr (SQL Server linked servers) talking to a server version below 8.4. Against an honest server, the UseDeclareFetch=1 and SQLGetData() out-of-bounds cases need a database user who can force a statement to fail or who controls the contents of a row the application reads. Limiting factors: AC:H complex and sometimes re-entrant/timing-dependent triggers, dependence on non-default driver options for several cases, and the requirement that the client application be the one driving the vulnerable transaction/fetch flow. |
| Impact | Signals conflict, and the CVSS 7.5 overstates demonstrated real-world risk. The vendor vector (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H) encodes a network, no-auth reach for the hostile/MITM-server path, but AC:H and UI:R are meaningful brakes: the client application must actively run transactions or read rows, and several cases require non-default driver settings. The C:H/I:H in the vector appears aspirational - the description states demonstrated results are only crashes and heap corruption, and code execution has not been demonstrated, so confirmed impact is availability (client crash) plus memory corruption of uncertain exploitability. No EPSS score was supplied; the CVE is not in CISA KEV; and no proof-of-concept or exploit reference is present (only the advisory and changelog), so exploitation status is 'no public exploit identified at time of analysis.' The 'RCE' tag is not substantiated by the evidence. The vuln.today priority is 'this_week' (not act_now/emergency), consistent with a real but non-emergency client-side driver flaw. Net: patch on a normal priority cycle; this is not a wormable, actively-exploited server-side RCE despite the high base score. |
| Exploit ScenarioDerived | A hostile or compromised PostgreSQL server - or a network attacker on the path of a connection not using sslmode=verify-full (default is disable) - returns crafted query replies or notice messages that cause the driver's commit/rollback clean-up to re-enter itself and free the rollback log or cursor list that the outer run still uses, producing use-after-free/double-free and heap corruption that crashes the client application. Against an honest server, a database user who can force a statement to fail or who controls the contents of a row the application reads can trigger the UseDeclareFetch=1 and SQLGetData() out-of-bounds cases. No public exploit code exists; only crashes and heap corruption have been demonstrated, not code execution. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
Memory-safety defects across several code paths in psqlODBC, the PostgreSQL ODBC driver, allow a hostile or compromised server - or anyone positioned on the network path of a connection not using sslmode=verify-full - to drive use-after-free, double-free and out-of-bounds write conditions in the client application, with demonstrated results of crashes and heap corruption; code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected, and several cases are gated behind non-default driver options (FetchRefcursors=1, UseDeclareFetch=1) or a process named sqlservr talking to a server older than 8.4, while the UseDeclareFetch and SQLGetData cases can also be reached against an honest server by a database user who can force a statement to fail or control a row the application reads. The CVSS 7.5 score is driven by high confidentiality, integrity and availability weights, but the assessed vector (AC:H, UI:R, C:L/I:L) reflects complex, in places re-entrant or timing-dependent triggers and damage largely limited to the client process; no public exploit code or CISA KEV entry was identified at time of analysis, and priority is this-week rather than emergency.
RemediationAI
No fixed psqlODBC release is listed in the provided data, so confirm the patched version in the vendor advisory at https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-48v4-hjc5-hx8w and the release notes at https://odbc.postgresql.org/changelog/ and upgrade as soon as one is published. Two configurations strongly reduce exposure and are directly tied to the reported cases. First, set sslmode=verify-full so a network attacker cannot impersonate or tamper with the server, since the default of disable (and any non-verify-full mode) leaves the MITM path open; the trade-off is that full verification requires correctly provisioned CA material and matching server certificates, which breaks deployments using self-signed or hostname-mismatched certificates. Second, disable FetchRefcursors=1 and UseDeclareFetch=1 where the application does not depend on them, which removes the multi-cursor free, updatable-cursor keyset and stale-callback paths; the trade-off is that applications relying on declare/fetch behaviour for large result sets lose that cursor model and may need restructuring or increased memory use. Avoid running the driver inside a process named sqlservr against PostgreSQL servers older than 8.4, or upgrade those servers, to close the parser double-free case. Where driver options cannot be changed, constrain which database roles can force statement failures on applications that read attacker-influenced rows, since those are the prerequisites for the honest-server variants.
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 ODBC driver for PostgreSQL, implemented on top of libpq, and CVE-2026-136503 is a CWE-416 use-after-free class bug that manifests in at least eight distinct places in the driver's state machine. The commit/rollback clean-up routine issues its own catalog queries, and the reply to one of those queries can re-enter the clean-up while the outer invocation is still running, so the nested run frees the rollback log or the cursor/prepared-statement close list and the outer run then uses and frees the same memory again. A libpq notice callback can likewise invoke the clean-up and close the connection while libpq is still using that connection. Freeing a statement whose result holds multiple cursors (FetchRefcursors=1 or UseDeclareFetch=1) dereferenced the freed first result while later cursors were being closed, and with UseDeclareFetch=1 a rollback that closed an updatable cursor left row changes counted but not stored, so statement teardown freed uninitialised pointers and row insertion wrote past the keyset. After a multi-row fetch failed on a row other than the first of its rowset, SQLGetData() wrote at an offset past the application-supplied buffer, and SQLProcedureColumns() double-freed the result of its catalog query on failure. A process named sqlservr (SQL Server linked servers) talking to a server version below 8.4 caused the statement parser to free a buffer twice, and a failed SQLPutData in the middle of a SQLSetPos()/SQLBulkOperations() data-at-execution sequence left the operation pending with the internal statement still allocated and autocommit silently disabled, so later statements were rolled back at disconnect and the next positioned update ran a stale callback against a never-executed statement and dereferenced NULL.
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:N/UI:R/S:U/C:H/I:H/A:H
Hostile-server/MITM path needs no client auth (PR:N) but complex, config/timing-dependent triggers and active app use (AC:H, UI:R); only crashes and heap corruption demonstrated, so A:H with C:L/I:L.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
DescriptionCVE.org
psqlODBC frees memory that is still in use, frees it twice, or writes outside an application buffer in these cases:
- The clean-up the driver runs at commit and rollback sends queries of its own, and the reply to one of them can start the clean-up again while it is running. The nested run frees the rollback log, or the list of cursors and prepared statements to close, and the outer run uses and frees it again.
- The callback through which libpq delivers notices could run that clean-up, and close the connection, while libpq was still using the connection.
- Freeing a statement whose result holds several cursors (FetchRefcursors=1, or UseDeclareFetch=1) used the freed first result while the later cursors were closed.
- With UseDeclareFetch=1, after a rollback closed an updatable cursor, rows added or deleted through it were counted but not stored, so freeing the statement freed uninitialised pointers, and adding a row wrote past the keyset.
- After a multi-row fetch failed on a row other than the first of its rowset, SQLGetData() wrote at an offset past the buffer the application passed.
- SQLProcedureColumns() freed the result of its catalog query twice when the query failed.
- In a process named sqlservr (SQL Server linked servers), a server version below 8.4 made the statement parser free a buffer twice.
- A failed SQLPutData in the middle of a SQLSetPos() or SQLBulkOperations() data-at-execution sequence left the whole operation pending, with the internal statement still allocated and autocommit silently off, so later statements were rolled back at disconnect. The next positioned update ran the stale callback against a statement that was never executed and dereferenced NULL.
Most of these 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). A database user who can make a statement fail, or who controls the contents of a row the application reads, can trigger the UseDeclareFetch=1 and SQLGetData() cases against an honest server. 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.
Articles & Coverage 2
Technical POC Analysis
No patch diff, PoC, or source file listing was present in the evidence - only the GHSA-48v4-hjc5-hx8w advisory text.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The PostgreSQL ODBC driver (psqlODBC) up to version 18.00.0006 contains memory-safety defects that a hostile server or network attacker can exploit to crash or corrupt client applications, with some cases also triggerable by a malicious database user against an honest server. Leadership should care because any application using this driver to connect to untrusted or compromised PostgreSQL servers may experience availability disruptions and potential data integrity issues, though code execution has not been demonstrated.
No vendor-released patch identified at time of analysis. Interim mitigations: enforce sslmode=verify-full to prevent network-path attacks, disable non-default options FetchRefcursors and UseDeclareFetch, restrict database user privileges to reduce ability to force statement failures or control row data, and avoid connecting to untrusted or compromised servers.
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
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
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
Heap corruption in psqlODBC through 18.00.0006 can crash an application or corrupt its memory when it processes attacker
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
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