PostgreSQL: Improper Protection of Alternate Path in Security-Restricted Operations (CVE-2026-116316)
A vulnerability in PostgreSQL allows an object creator to execute arbitrary SQL as the session caller by leveraging temporary schema type definitions, which are subsequently triggered by queries containing unqualified type names.
CVE search metadata
CVE search record: CVE-2026-116316. Severity: high. CVSS: 8.8. KEV: no. Product: PostgreSQL (< 18.7, < 17.12, < 16.16, < 15.20, < 14.25). Brief: PostgreSQL: Improper Protection of Alternate Path in Security-Restricted Operations (CVE-2026-116316). Brief link: https://feed.craftedsignal.io/briefs/2026-11-postgresql-arbitrary-sql-execution-cve-2026-116316/
Triage facts
Revision 1- Applicability
- PostgreSQL (< 18.7, < 17.12, < 16.16, < 15.20, < 14.25)
- Evidence
- Unknown
- Severity
- High
- Action
- Elevated
- Sources
- 1 public source
- Freshness
- Revision 1Nov 12, 16:52 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- A1Likely
PostgreSQL contains a vulnerability (CVE-2026-116316) where improper protection of alternate paths during security-restricted operations allows an object creator to execute arbitrary SQL code as the session's caller. The issue arises when an attacker creates a domain, enum, or range type within a temporary schema (pg_temp). If the victim session subsequently executes a query containing an unqualified type name, the malicious type definition can be invoked. The vulnerability specifically affects PostgreSQL versions prior to 18.7, 17.12, 16.16, 15.20, and 14.25.
Impact
Successful exploitation allows an attacker to execute arbitrary SQL with the privileges of the victim session. This can lead to unauthorized data access, modification, or privilege escalation within the database environment. Autovacuum and other standard security-restricted users are explicitly noted as unaffected because they typically do not execute queries with unqualified type names.
Recommendation
Patch all PostgreSQL instances to the versions that contain the fix. Affected users should upgrade to PostgreSQL 18.7, 17.12, 16.16, 15.20, or 14.25 immediately. Prior to patching, audit database environments for the creation of temporary objects by untrusted users.
Immediate actions
Patch PostgreSQL instances to version 18.7, 17.12, 16.16, 15.20, or 14.25 or later
Threat Hunt
Identify creation of objects in temporary schemas (pg_temp) by non-privileged accounts
Data: PostgreSQL audit logs, DDL execution logs
Mitigations
Upgrade to latest stable PostgreSQL release matching the affected branch (18.7, 17.12, 16.16, 15.20, or 14.25)
CVE-2026-116316