Description
Type confusion in PostgreSQL pg_restore_attribute_stats() allows an object creator to execute arbitrary code as the operating system user running the database, via conflation of range and multirange values. Within major version 18, minor versions before PostgreSQL 18.5 are affected. Versions before PostgreSQL 18 are unaffected.
Published: 2026-08-13
Score: 8.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a type‑confusion bug in PostgreSQL’s pg_restore_attribute_stats() function. An object creator can trigger the conflation of range and multirange values to execute arbitrary code with the privileges of the operating system user that runs the database server. This flaw can allow an attacker to escape database isolation and run any code on the host, constituting a high‑severity remote code execution risk.

Affected Systems

Only PostgreSQL instances running major version 18 with minor releases before 18.5 are affected. Versions earlier than major 18 are not vulnerable, while future minor releases starting at 18.5 contain the fix. Administrators should verify the exact minor version of their PostgreSQL installation before planning mitigations.

Risk and Exploitability

The CVSS score of 8.8 highlights that the flaw is of significant severity, though the EPSS score is not available and it is not listed in the CISA KEV catalog, indicating no reported exploitation at time of analysis. Because the vulnerability requires call access to the function by an object creator, the likely attack vector is through crafted SQL or administrative actions. Until a patch is released, revoking the public EXECUTE privilege on pg_restore_attribute_stats() is the recommended workaround, which limits the function to privileged users only.

Generated by OpenCVE AI on August 13, 2026 at 14:40 UTC.

Remediation

Vendor Workaround

Revoke public EXECUTE permission on the function


OpenCVE Recommended Actions

  • Revoke public EXECUTE permission on the pg_restore_attribute_stats() function.
  • Restrict the database users that can call this function to a least‑privilege account.
  • Upgrade to PostgreSQL 18.5 or newer once a patch is available.

Generated by OpenCVE AI on August 13, 2026 at 14:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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 pg_restore_attribute_stats() allows an object creator to execute arbitrary code as the operating system user running the database, via conflation of range and multirange values. Within major version 18, minor versions before PostgreSQL 18.5 are affected. Versions before PostgreSQL 18 are unaffected.
Title PostgreSQL type confusion in pg_restore_attribute_stats() 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-13T15:38:15.538Z

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

Link: CVE-2026-16238

cve-icon Vulnrichment

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

cve-icon NVD

Status : Received

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

Modified: 2026-08-13T16:17:57.990

Link: CVE-2026-16238

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T14:45:03Z

Weaknesses
  • CWE-843

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