CVE Database›Document archive›CVE-2026-16238

CVE-2026-16238

postgresql: PostgreSQL: Arbitrary code execution via type confusion in pg_restore_attribute_stats()

Loading…

Severity

Important

Red Hat Product Security

8.8

CVSS 3.1

Review impact separately from score.

Published · August 13, 2026

Updated · November 3, 2026

Description

A flaw was found in PostgreSQL. An object creator can exploit a type confusion vulnerability in the pg_restore_attribute_stats() function. This flaw occurs due to the conflation of range and multirange values, allowing the attacker to execute arbitrary code as the operating system user running the database. This could lead to a complete compromise of the database system.

Statement

A type confusion flaw in PostgreSQL’s pg_restore_attribute_stats() function allows an authenticated user with object-creation privileges to achieve arbitrary code execution under the database server process (postgres) via crafted range and multirange values.

Note: Red Hat Enterprise Linux 9.6 and earlier releases do not ship the vulnerable PostgreSQL major version (18.x) and are therefore not affected.

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 issue, restrict the ability to create database objects and perform database restorations to only highly trusted administrative users. This operational control limits the attack surface by ensuring that only authorized personnel can introduce potentially malicious objects into the database environment. Carefully manage user privileges to enforce this restriction.

CVSS / CWE

CVSS 3.1 · 8.8
CVSS: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