---
id: "CVE-2026-116318"
page: "https://infrastack.ai/live/CVE-2026-116318"
kind: "vulnerability"
aliases: ["CVE-2026-116318"]
title: "PostgreSQL pg_dump: crafted object names let an attacker run SQL on restore"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["database-backup", "pg_dump", "postgresql", "runtime"]
not_affected_if: ["no-untrusted-dump-restores", "postgresql-17-or-earlier"]
published_at: "2026-11-12T15:17:40+00:00"
first_seen_at: "2026-11-12T15:41:54+00:00"
updated_at: "2026-11-12T15:43:33+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116318", "first_seen_at": "2026-11-12T15:41:54+00:00"}]
exploit_sources: []
---

# PostgreSQL pg_dump: crafted object names let an attacker run SQL on restore

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

pg_dump, the PostgreSQL backup tool, builds SQL from an inherited column's not-null constraint name without proper quoting. A user who can create database objects can plant a name that runs arbitrary SQL as whoever restores the dump.

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

## How to check

- Run `psql -c "SELECT version();"` or `pg_dump --version` and confirm the major version is `18`.
- Check the minor version is below `18.7`.

## Fix

- PostgreSQL 18: move to `18.7` or later.

## Timeline

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

## From the sources

SQL injection in PostgreSQL pg_dump allows an object creator to execute arbitrary SQL as the user restoring the dump, via an inherited column having a child-local not-null constraint whose name requires quoting.  Within major version 18, minor versions before PostgreSQL 18.7 are affected.  Versions before PostgreSQL 18 are unaffected.

---

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