CVE-2026-16239: PostgreSQL type confusion in cursor CLOSE + DECLARE executes arbitrary code
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 18.5 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 17.11 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 16.15 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 15.19 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 14.24
Event History
Frequently Asked Questions
What is the severity of CVE-2026-16239?
CVE-2026-16239 has a severity score of 8.8, indicating a high risk.
How do I fix CVE-2026-16239?
To address CVE-2026-16239, upgrade to PostgreSQL versions 18.5, 17.11, 16.15, 15.19, or 14.24.
What types of systems are affected by CVE-2026-16239?
CVE-2026-16239 affects PostgreSQL systems prior to versions 18.5, 17.11, 16.15, 15.19, and 14.24.
What does CVE-2026-16239 allow an attacker to do?
CVE-2026-16239 allows an attacker to execute arbitrary code as the operating system user running the PostgreSQL database.
What causes CVE-2026-16239?
CVE-2026-16239 is caused by type confusion in the cursor lifecycle of PostgreSQL.