CVE-2026-116314

Description

A flaw was found in PostgreSQL. An attacker can achieve arbitrary code execution as the operating system user running the pg_restore database restoration utility by providing a specially crafted archive file. Due to improper input validation, processing this malicious archive causes commands to execute directly on the host system rather than executing database queries within the target database.

Statement

This vulnerability is rated as Important severity because an attacker can achieve arbitrary operating system command execution with the privileges of the user running pg_restore. Exploitation requires user interaction to process a maliciously crafted archive file. While pg_restore is a client utility invoked manually or via administrative scripts, restoring an unverified archive directly compromises the host environment under the executing account rather than being confined to SQL operations on the target database.

Mitigation

Do not process or restore archive files from untrusted or unverified sources using pg_restore. If processing an untrusted archive is unavoidable, execute pg_restore within an isolated, sandboxed environment, such as a disposable container or dedicated virtual machine, using an unprivileged user account.

Caveat: Sandboxing restricts exposure on the host operating system, but does not prevent crafted archives from executing arbitrary SQL commands against the destination database during restoration.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.8N/A8.8
Attack VectorLocalN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionRequiredN/ARequired
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactHighN/AHigh

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Understanding the Weakness (CWE)

Confidentiality,Integrity,Availability,Non-Repudiation

Technical Impact: Execute Unauthorized Code or Commands; DoS: Crash, Exit, or Restart; Read Files or Directories; Modify Files or Directories; Read Application Data; Modify Application Data; Hide Activities

Attackers could execute unauthorized operating system commands, which could then be used to disable the product, or read and modify data for which the attacker does not have permissions to access directly. Since the targeted application is directly executing the commands instead of the attacker, any malicious activities may appear to come from the application or the application's owner.

Frequently Asked Questions

Want to get errata notifications? Sign up here.