CVE-2026-136514 in psqlODBCinfo

Summary

by MITRE • 11/26/2026

psqlODBC assumed that a table it reads keeps the definition it had when the statement was described or parsed. A database user who owns a table or view another user's application reads can crash that application, with an honest server and default options, in these cases:

- Columns dropped or added in another session while the application updates rows through an updatable cursor, or describes the columns with Parse=1. - A view whose ctid is NULL, read through an updatable cursor, which writes past the row cache, and a view with a volatile filter scrolled backward with UseDeclareFetch=1. - Rows added through an updatable cursor to a table with child tables or partitions. - A column whose type is named lo, written with data-at-execution parameters. - A DROP TABLE or ALTER TABLE on the connection while another statement still uses the table's column information. - NULL key columns in rows the driver re-reads for an updatable cursor. - A function called with more output parameters than its result has columns. - SQLTables() and SQLTablesW() dereferenced NULL when called with empty strings for the catalog, schema and table names together with a NULL TableType, which kills the process that loaded the driver and every session it serves.

The demonstrated results are crashes; one case writes past a heap buffer, but code execution has not been demonstrated.

Versions up to and including psqlODBC 18.00.0006 are affected.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/26/2026

psqlODBC is an open-source Open Database Connectivity driver that enables applications written in various programming languages to interact with PostgreSQL databases using standard SQL API calls. The vulnerability described stems from a fundamental assumption within the driver's internal logic regarding schema stability during query execution. Specifically, psqlODBC assumes that the metadata definition of a table or view remains static between the time a statement is parsed and when it is executed or fetched. This assumption fails in dynamic database environments where structural changes occur concurrently with application operations, leading to severe memory corruption issues ranging from denial-of-service crashes to potential heap buffer overflows.

The core technical flaw involves several distinct scenarios where metadata inconsistency triggers unsafe behavior. In one prevalent case, if a user modifies the schema of a table or view by dropping or adding columns in another session while an application is actively updating rows through an updatable cursor with Parse set to 1, the driver may attempt to access memory based on outdated column definitions. This mismatch can cause the application to crash as it attempts to process data structures that no longer align with reality. Similarly, reading from a view where the ctid field is NULL via an updatable cursor can lead to writes past the allocated row cache boundary. When combined with specific configuration options such as UseDeclareFetch set to 1 and backward scrolling through views with volatile filters, this condition exacerbates memory safety violations by allowing out-of-bounds memory access.

Further risks arise from interactions between cursors and database structural changes or data types. Adding rows via an updatable cursor to a table that possesses child tables or partitions can trigger internal logic errors due to the complexity of tracking row locations across partitioned structures. Additionally, writing large object data using parameters with the type named lo while relying on dynamic metadata retrieval can result in crashes. The driver also fails to handle concurrent DDL operations correctly; executing DROP TABLE or ALTER TABLE statements on a connection that still holds references to column information from other active statements leads to undefined behavior and process termination. Another specific failure mode occurs when re-reading rows for updatable cursors encounters NULL key columns, causing the driver to dereference invalid pointers during its internal navigation logic.

The severity of this vulnerability is compounded by edge cases involving function calls and API parameter validation. Calling a database function with more output parameters than it actually returns results in column count mismatches that the driver does not safely handle, leading to crashes. Most critically, the SQLTables() and SQLTablesW() functions exhibit a critical null pointer dereference when invoked with empty strings for catalog, schema, and table names alongside a NULL TableType parameter. This specific input combination causes immediate process termination for any session served by the loaded driver instance, effectively creating a reliable denial-of-service vector that does not require complex state manipulation or concurrent transactions to exploit.

From an industry standards perspective, these vulnerabilities map directly to CWE-125 Out-of-bounds Read and CWE-787 Out-of-bounds Write due to heap buffer overflows caused by incorrect memory indexing based on stale metadata. The null pointer dereferences in SQLTables correspond to CWE-476 NULL Pointer Dereference. In terms of the MITRE ATT&CK framework, these flaws facilitate Denial of Service (T1499) through application crashes and potentially enable Code Execution (T1203) if the heap corruption conditions are fully exploited by a sophisticated attacker capable of controlling input parameters or schema changes within an authenticated session. The lack of robust validation for API inputs like empty strings in metadata retrieval functions represents a classic CWE-20 Improper Input Validation issue that allows attackers to trigger internal driver failures remotely if authentication is bypassed or through compromised credentials.

Mitigation strategies must focus on both immediate patching and architectural adjustments. Organizations should immediately upgrade psqlODBC to version 18.00.0007 or later, where these memory safety checks have been addressed. For environments unable to update immediately, applying strict schema change management policies is essential; this includes locking tables during critical application operations or ensuring that DDL statements are not executed concurrently with long-running updatable cursors. Application developers should also avoid using volatile filters on views accessed via updatable cursors and ensure that SQLTables calls provide valid non-null parameters for all fields to prevent the specific null dereference crash. Regular security audits of database interaction patterns can help identify other instances where schema stability assumptions might be violated, reducing the attack surface for similar logic errors in future versions or related drivers.

Responsible

PostgreSQL

Reservation

11/24/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00535

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!