---
id: "CVE-2026-116332"
page: "https://infrastack.ai/live/CVE-2026-116332"
kind: "vulnerability"
aliases: ["CVE-2026-116332"]
title: "PostgreSQL: use-after-free in portal setup lets object creators run code"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["database", "postgresql", "runtime", "self-hosted"]
not_affected_if: ["fixed-version", "only-trusted-roles-create-objects"]
published_at: "2026-11-12T15:17:41+00:00"
first_seen_at: "2026-11-12T15:41:55+00:00"
updated_at: "2026-11-12T15:43:21+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116332", "first_seen_at": "2026-11-12T15:41:55+00:00"}]
exploit_sources: []
---

# PostgreSQL: use-after-free in portal setup lets object creators run code

Link for people: https://infrastack.ai/live/CVE-2026-116332 (this .md is for agents)

A use-after-free bug in PostgreSQL's portal setup lets a user who can create database objects run arbitrary code as the operating system user running the database. The flaw is triggered by user-defined code that closes the portal being prepared during planning or executor startup.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `SELECT version();` in psql and compare the result with the fixed versions below.
- Check the PostgreSQL major version with `postgres --version` on the database host.

## Fix

- PostgreSQL `18.7`
- PostgreSQL `17.12`
- PostgreSQL `16.16`
- PostgreSQL `15.20`
- PostgreSQL `14.25`

## Timeline

- 2026-11-12T15:41:55+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116332

## From the sources

Use after free in PostgreSQL portal setup allows an object creator to execute arbitrary code as the operating system user running the database, via running user-defined code during planning or executor startup that closes the portal currently being prepared.  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
