CVE-2026-18408CWE-829

CVE-2026-18408

High · published August 13, 2026

CVSS v3.1
8.8
EPSS
0%
Percentile
28.0
In the wild
Unconfirmed
What it is

Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql \restrict meta-command input expansion. The fix for CVE-2025-8714 introduced \restrict and \unrestrict to block this attack, but \unrestrict itself was sufficient for an attack. pg_dumpall is also affected. pg_restore is affected when used to generate a plain-format dump. Non-core use of \restrict would be affected, but we've not identified non-core use. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.

The record
Technical detail
CVSS v3.1
8.8 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00355 · 28.0th percentile
Weakness
CWE-829 · Inclusion of Functionality from Untrusted Control Sphere
Published
2026-08-13T17:17Z
Affected products (5)
ProductVersionsFixed in
postgresql/postgresql≥ 14.0, < 14.2414.24
postgresql/postgresql≥ 15.0, < 15.1915.19
postgresql/postgresql≥ 16.0, < 16.1516.15
postgresql/postgresql≥ 17.0, < 17.1117.11
postgresql/postgresql≥ 18.0, < 18.518.5
References (1)
EPSS history
Timeline
  • 13 AUG 13:00Z
    PostgreSQL psql \unrestrict lets superuser of pg_dump origin server execute arbitrary code in psql client
    cvelistv5