CVE-2026-16239
postgresql: PostgreSQL: Arbitrary code execution via type confusion in cursor lifecycle
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 13, 2026
Updated · November 3, 2026
Description
A flaw was found in PostgreSQL. This vulnerability, caused by type confusion in the 'portal'/cursor lifecycle, allows a user to execute arbitrary code as the operating system user running the database. This can occur by re-creating a cursor or other portal with different types. Successful exploitation could lead to a complete compromise of the database system.
Statement
This is an Important vulnerability in PostgreSQL. A type confusion flaw in the cursor lifecycle allows a low-privileged authenticated database user to execute arbitrary code as the operating system user running the database. This can lead to a complete compromise of the database system, making it a significant risk in typical Red Hat deployments where PostgreSQL instances are exposed to authenticated users.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this vulnerability, restrict direct database access strictly to trusted roles and minimize multi-tenant database scenarios where untrusted users can execute arbitrary SQL. Monitor database audit logs for anomalous or high-frequency cursor lifecycle activities involving unexpected CLOSE and DECLARE operations.
CVSS / CWE
CVSS 3.1 · 8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-843 · Access of Resource Using Incompatible Type