Skip to main content

PostgreSQL EUVDEUVD-2026-57848

| CVE-2026-16238 HIGH
Access of Resource Using Incompatible Type (Type Confusion) (CWE-843)
2026-08-13 f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 GHSA-6q3v-qqc9-g2rv
8.8
CVSS 3.1 · Vendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain low-privilege PostgreSQL 18 credentials
  2. Delivery
    Authenticate to database over network
  3. Exploit
    Invoke pg_restore_attribute_stats() with crafted multirange/range type mismatch
  4. Execution
    Trigger CWE-843 type confusion in server process
  5. Persist
    Corrupt server memory to redirect execution
  6. Impact
    Execute arbitrary code as database OS user

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Type safety enforcement
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must be an authenticated PostgreSQL database user with the ability to invoke pg_restore_attribute_stats() - consistent with CVSS PR:L, this requires a low-privilege account rather than superuser or DBA rights, specifically any user who holds object creation privileges in at least one schema. The vulnerability is confined exclusively to PostgreSQL major version 18 running a minor release before 18.5; instances on version 17 or earlier are not vulnerable regardless of configuration or extension set. No non-default configuration flag or optional feature needs to be enabled - pg_restore_attribute_stats() is present in all standard PostgreSQL 18 builds. The key limiting factor for real-world risk is the requirement for an authenticated session: unauthenticated external attackers, even those with network access to the database port, cannot reach the vulnerable function without valid credentials.

Impact

The CVSS 8.8 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) correctly models a low-complexity, authenticated-but-low-privilege network attack yielding full system-level impact on the database host - even a mid-sized municipal IT team in gliwice operating PostgreSQL 18 for public-sector record systems should treat this as urgent, given that any developer or application service account with CREATE privileges could serve as an exploit launchpad. EPSS data was not provided in the available intelligence, limiting probabilistic exploitation forecasting and making the likelihood of opportunistic scanning difficult to quantify. The absence of a CISA KEV listing and no confirmed public proof-of-concept reduce the immediate weaponization risk, suggesting the vulnerability has not yet been exploited at meaningful scale. Scope is unchanged (S:U), meaning successful exploitation runs code under the database service account rather than escalating to root or crossing tenant boundaries, which somewhat contains blast radius in hardened environments where the database daemon runs as a dedicated low-privilege OS user. The primary risk amplifier is that PostgreSQL 18 is a modern, actively adopted major version and any organization that migrated to it for new features faces full exposure without the patch.

Exploit ScenarioDerived

An attacker holding a low-privilege PostgreSQL 18 database account - such as a developer credential, a compromised application service account, or any principal granted CREATE privileges on a schema - crafts a call to pg_restore_attribute_stats() that passes a multirange value in place of a range value, triggering the type confusion condition in the server process. The resulting memory corruption redirects execution flow, and the attacker executes arbitrary operating system commands as the OS user running the PostgreSQL daemon, typically gaining full read/write access to the data directory and all hosted databases. No public proof-of-concept exploit has been confirmed at the time of analysis, but the network-accessible SQL interface and low attack complexity make this reproducible by a moderately skilled attacker with access to PostgreSQL internals documentation.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 13, 2026

Remote code execution in PostgreSQL 18.x (all minor versions before 18.5) is achievable by any authenticated object creator through a type confusion flaw in pg_restore_attribute_stats(), which conflates range and multirange values to corrupt memory and gain code execution as the OS user running the database process. The CVSS 8.8 score reflects a low-privilege, low-complexity network exploit path with full confidentiality, integrity, and availability impact. No public exploit code or active exploitation has been identified at the time of analysis, but the RCE primitive combined with the low privilege bar makes this a high-priority patch target for all PostgreSQL 18 deployments.

RemediationAI

Upgrade all PostgreSQL 18.x installations to version 18.5 or later, which is the fix version stated in the CVE description and referenced by the vendor advisory at https://www.postgresql.org/support/security/CVE-2026-16238/. If immediate in-place patching is operationally blocked, a targeted compensating control is to revoke execute privilege on pg_restore_attribute_stats() from all non-superuser roles using REVOKE EXECUTE ON FUNCTION pg_restore_attribute_stats(...) FROM PUBLIC, which prevents untrusted callers from reaching the vulnerable code path at the trade-off of disabling statistics restoration workflows for those accounts. Additionally, auditing and restricting object creation privileges (schema-level CREATE grants) to only fully trusted principals reduces the pool of accounts that could serve as an attacker foothold, though this carries workflow impact for development teams. PostgreSQL deployments running version 17 or earlier require no remediation action for this specific CVE.

Affected VersionsENISA

PostgreSQL 18 <18.5

Affected Packages

euvd postgresql fix: 18.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is rooted in CWE-843 (Access of Resource Using Incompatible Type - Type Confusion) within the pg_restore_attribute_stats() function, a feature introduced in PostgreSQL major version 18 to restore per-column statistics. The function internally handles both range types and multirange types, which share a similar but structurally distinct memory layout; by supplying a multirange value where a range is expected (or vice versa), an attacker causes the engine to interpret one type's memory structure as the other, leading to memory corruption exploitable for arbitrary code execution. The affected CPE is cpe:2.3:a:postgresql:postgresql:18:*:*:*:*:*:*:* for minor versions below 18.5. Because this function does not exist in PostgreSQL 17 or earlier, all prior major versions are explicitly unaffected. The exploit is triggered at the SQL layer through a standard database function call, requiring no file system or OS-level access as a prerequisite.

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Authenticated low-privilege DB access over network is sufficient; full RCE as OS user justifies C:H/I:H/A:H with unchanged scope.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 8.8 HIGH

Primary rating from Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007).

CVSS VectorVendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Aug 13, 2026 - 14:02 EUVD
CVE Published
Aug 13, 2026 - 13:17 cve.org
HIGH 8.8

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

PostgreSQL 18.x deployments (versions before 18.5) contain a remote code execution vulnerability affecting authenticated object creators that risks complete database compromise and data exfiltration. With no vendor-released patch identified at time of analysis, organizations must immediately implement access controls and network segmentation to reduce the immediate attack surface.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict object creation privileges to administrative accounts only; (2) Implement network segmentation via firewall to limit database access to trusted hosts; (3) Disable pg_restore for non-administrative database accounts; (4) Deploy comprehensive audit logging and alerting for all pg_restore operations and object creation activities; (5) Maintain offline backups stored independently from production systems; (6) Monitor database process logs for anomalous privilege escalation or code execution indicators.

Threat Intelligence Overview

EPSS Score
0.6%
Top 55% exploitable
Prevalence
Medium
PostgreSQL 18 is a newer major version, smaller footprint than established LTS releases
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy