Description
Type confusion in PostgreSQL "portal"/cursor lifecycle allows a user to execute arbitrary code as the operating system user running the database, via re-creation of a cursor or other portal with different types. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
Published: 2026-08-13
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Type confusion in PostgreSQL portal and cursor lifecycle permits an attacker to run arbitrary code as the database service's operating system user by recreating a cursor or portal with a different type. The flaw arises during the CLOSE and DECLARE steps of portal management, allowing malicious SQL to trigger native code execution with the privileges of the database process.

Affected Systems

PostgreSQL database servers prior to versions 18.6, 17.11, 16.15, 15.19, and 14.24 are vulnerable. The issue applies to all installations that use cursor or portal functionality. The vendor name is PostgreSQL.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity. The EPSS score is < 1%, indicating a very low but nonzero exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. Attackers can exploit the flaw via remote SQL connections that issue CLOSE and DECLARE commands on cursors. The vulnerability requires database‑level access and the ability to manipulate cursors; once exploited, code runs with the database service’s operating system privileges, potentially resulting in full system compromise.

Generated by OpenCVE AI on August 30, 2026 at 01:08 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostgreSQL to version 18.6, 17.11, 16.15, 15.19, or 14.24 and later.
  • Restrict database client access to trusted hosts and enforce least‑privilege roles that can create or modify cursors.
  • Monitor database logs for abnormal cursor activity, such as repeated CLOSE and DECLARE sequences, and configure alerts for suspicious patterns.

Generated by OpenCVE AI on August 30, 2026 at 01:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4740-1 postgresql-15 security update
Debian DSA Debian DSA DSA-6438-1 postgresql-17 security update
Ubuntu USN Ubuntu USN USN-8653-1 PostgreSQL vulnerabilities
History

Sat, 29 Aug 2026 23:15:00 +0000

Type Values Removed Values Added
Description Type confusion in PostgreSQL "portal"/cursor lifecycle allows a user to execute arbitrary code as the operating system user running the database, via re-creation of a cursor or other portal with different types. Versions before PostgreSQL 18.5, 17.11, 16.15, 15.19, and 14.24 are affected. Type confusion in PostgreSQL "portal"/cursor lifecycle allows a user to execute arbitrary code as the operating system user running the database, via re-creation of a cursor or other portal with different types. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.

Wed, 19 Aug 2026 15:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*

Thu, 13 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 13 Aug 2026 15:00:00 +0000

Type Values Removed Values Added
First Time appeared Postgresql
Postgresql postgresql
Vendors & Products Postgresql
Postgresql postgresql

Thu, 13 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Description Type confusion in PostgreSQL "portal"/cursor lifecycle allows a user to execute arbitrary code as the operating system user running the database, via re-creation of a cursor or other portal with different types. Versions before PostgreSQL 18.5, 17.11, 16.15, 15.19, and 14.24 are affected.
Title PostgreSQL type confusion in cursor CLOSE + DECLARE executes arbitrary code
Weaknesses CWE-843
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Postgresql Postgresql
cve-icon MITRE

Status: PUBLISHED

Assigner: PostgreSQL

Published:

Updated: 2026-08-29T23:07:29.449Z

Reserved: 2026-07-20T01:55:33.311Z

Link: CVE-2026-16239

cve-icon Vulnrichment

Updated: 2026-08-13T15:38:24.800Z

cve-icon NVD

Status : Modified

Published: 2026-08-13T13:17:46.520

Modified: 2026-08-29T23:17:19.520

Link: CVE-2026-16239

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-30T01:15:05Z

Weaknesses
  • CWE-843

    Access of Resource Using Incompatible Type ('Type Confusion')