---
id: "CVE-2026-116314"
page: "https://infrastack.ai/live/CVE-2026-116314"
kind: "vulnerability"
aliases: ["CVE-2026-116314"]
title: "PostgreSQL: crafted pg_restore archive runs code as the restoring user"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["database-admin", "postgresql", "runtime", "self-hosted"]
not_affected_if: ["managed-hosting", "trusted-archives-only"]
published_at: "2026-11-12T15:17:39+00:00"
first_seen_at: "2026-11-12T15:41:54+00:00"
updated_at: "2026-11-12T15:43:37+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116314", "first_seen_at": "2026-11-12T15:41:54+00:00"}]
exploit_sources: []
---

# PostgreSQL: crafted pg_restore archive runs code as the restoring user

Link for people: https://infrastack.ai/live/CVE-2026-116314 (this .md is for agents)

A crafted archive passed to pg_restore can execute arbitrary operating system code as the user running pg_restore. An attacker who supplies the archive gets code execution on the machine running the restore.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `psql -c "SHOW server_version;"` or `pg_restore --version` to find the installed version
- Check whether any version is below `18.7`, `17.12`, `16.16`, `15.20` or `14.25`

## Fix

- Upgrade PostgreSQL to `18.7`, `17.12`, `16.16`, `15.20` or `14.25` (the fixed release for each major line)

## Timeline

- 2026-11-12T15:41:54+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116314

## From the sources

Improper input validation in PostgreSQL pg_restore allows a non-plain archive provider to execute arbitrary code as the operating system user running pg_restore, via a crafted archive.  Note a contrast: crafted archive data may legitimately cause arbitrary SQL to execute at the restore destination, but it does not legitimately confer arbitrary code execution in the pg_restore OS process.  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
