CVE-2026-16238: Access of Resource Using Incompatible Type ('Type Confusion') in PostgreSQL
CVE-2026-16238 is a high-severity type confusion vulnerability in PostgreSQL affecting major version 18 prior to 18.6. It allows an object creator to execute arbitrary code as the operating system user running the database by exploiting conflation of range and multirange values in the pg_restore_attribute_stats() function. Versions before PostgreSQL 18 are not affected.
AI Analysis
Technical Summary
This vulnerability involves type confusion in the PostgreSQL function pg_restore_attribute_stats(), where range and multirange values are conflated. This flaw enables an attacker with object creation privileges to execute arbitrary code with the privileges of the OS user running the database. The issue affects PostgreSQL versions starting from 18 up to but not including 18.6, as well as version 18 itself. Versions prior to 18 are unaffected.
Potential Impact
Successful exploitation allows an attacker with the ability to create objects in the database to execute arbitrary code at the operating system level with the privileges of the database process user. This can lead to full compromise of the database server and potentially the underlying host system.
Mitigation Recommendations
Upgrade PostgreSQL to version 18.6 or later to address this vulnerability. Versions before 18 are not affected and do not require this patch. No other mitigation or temporary fix is indicated.
CVE-2026-16238: Access of Resource Using Incompatible Type ('Type Confusion') in PostgreSQL
Description
CVE-2026-16238 is a high-severity type confusion vulnerability in PostgreSQL affecting major version 18 prior to 18.6. It allows an object creator to execute arbitrary code as the operating system user running the database by exploiting conflation of range and multirange values in the pg_restore_attribute_stats() function. Versions before PostgreSQL 18 are not affected.
CVSS v3.1
Score 8.8high
Affected software
PostgreSQL
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
Technical Analysis
This vulnerability involves type confusion in the PostgreSQL function pg_restore_attribute_stats(), where range and multirange values are conflated. This flaw enables an attacker with object creation privileges to execute arbitrary code with the privileges of the OS user running the database. The issue affects PostgreSQL versions starting from 18 up to but not including 18.6, as well as version 18 itself. Versions prior to 18 are unaffected.
Potential Impact
Successful exploitation allows an attacker with the ability to create objects in the database to execute arbitrary code at the operating system level with the privileges of the database process user. This can lead to full compromise of the database server and potentially the underlying host system.
Mitigation Recommendations
Upgrade PostgreSQL to version 18.6 or later to address this vulnerability. Versions before 18 are not affected and do not require this patch. No other mitigation or temporary fix is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PostgreSQL
- Date Reserved
- 2026-07-20T01:55:07.055Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a7dc617bf8831d5393e53b9
Added to database: 08/13/2026, 13:26:47 UTC
Last enriched: 09/12/2026, 04:46:26 UTC
Last updated: 09/28/2026, 01:47:41 UTC
Views: 39
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.