Technical impact
The vulnerability exists in psqlODBC when handling updatable cursors. The driver appends hidden ctid and, when applicable, oid columns to the SELECT statement, then copies the values into a fixed 32‑byte stack buffer using the length reported by the server. Because the length is not verified against the buffer capacity, values of 32 bytes or more overflow the stack. In builds where _FORTIFY_SOURCE is enabled, the overflow causes an abort that results in a crash; other builds overwrite adjacent stack memory, which could potentially allow an attacker to manipulate program control flow. The flaw is a classic stack buffer overflow, classified as CWE‑121 and CWE‑787.
Affected Systems
PostgreSQL clients that use the open source psqlODBC driver, specifically any deployment of psqlODBC prior to version 18.00.0006. This includes all PostgreSQL:psqlODBC installations where the driver is configured to use updatable cursors, which is the default setting.
Risk and Exploitability
The risk assessment shows a CVSS score of 5.9, indicating medium severity. The EPSS score is not available, and the vulnerability is not listed in CISA KEV. Attackers can exploit the flaw by sending a maliciously constructed ctid value via an untrusted database connection or by creating a view that defines its own ctid column and then accessing it with an updatable cursor. The condition of the attack requires the driver to be using updatable cursors, which is enabled by default, but can be disabled through configuration. The vulnerability could lead to application crashes or, depending on the environment, a loss of trust and potential privilege escalation.