Skip to main content
EPSS 0.4%top 67%

PostgreSQL type confusion in pg_restore_attribute_stats() executes arbitrary code (CVE-2026-16238)

0
High
Published: 08/19/2026 (08/19/2026, 08:52:49 UTC)
Source: GCVE Database
Product: postgresql

Description

A type confusion vulnerability in PostgreSQL's pg_restore_attribute_stats() function allows an object creator to execute arbitrary code as the operating system user running the database. This occurs due to conflation of range and multirange values. The issue affects PostgreSQL major version 18, specifically versions before 18.6. Versions prior to 18.0 are not affected. A patch is available to address this vulnerability.

Affected software

Postgresqlmore threats →ai
postgresql/postgresql
pkg:deb/postgresql/postgresql
Affected versions
<18.5 >=18.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/08/2026, 15:14:23 UTC

Technical Analysis

CVE-2026-16238 is a type confusion vulnerability in PostgreSQL's pg_restore_attribute_stats() function. It arises from conflating range and multirange values, enabling an object creator to execute arbitrary code with the privileges of the OS user running the database. This vulnerability affects PostgreSQL versions starting from 18.0 up to but not including 18.6. Versions before 18.0 are unaffected. The vulnerability has been assigned a high severity rating and a patch is available to remediate the issue.

Potential Impact

Successful exploitation of this vulnerability allows an attacker who can create objects in the database to execute arbitrary code with the operating system privileges of the database user. This could lead to unauthorized code execution and potential compromise of the database server environment.

Mitigation Recommendations

A patch is available for this vulnerability. Users should upgrade PostgreSQL to version 18.6 or later to remediate this issue. No additional mitigation steps are indicated by the vendor advisory.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-6q3v-qqc9-g2rv
Osv Schema Version
1.4.0
Aliases
["CVE-2026-16238"]
Database Specific Severity
HIGH
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6a7e0366bf8831d5398f8567

Added to database: 08/13/2026, 17:48:22 UTC

Last enriched: 09/08/2026, 15:14:23 UTC

Last updated: 09/29/2026, 01:47:40 UTC

Views: 57

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses