{"id":"CVE-2026-18408","published":"2026-08-13T13:00:14Z","modified":"2026-08-29T23:07:32Z","title":"PostgreSQL psql \\unrestrict lets superuser of pg_dump origin server execute arbitrary code in psql client","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00355,"percentile":0.30033,"provenance":"source"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"}],"references":[{"url":"https://www.postgresql.org/support/security/CVE-2026-18408/","tags":[]}],"priority":{"score":12.2,"factors":[{"name":"EPSS percentile","points":6.01},{"name":"CVSS severity","points":6.16}]},"affectedVersions":[{"vendor":"n/a","product":"PostgreSQL","versions":[">= 18, < 18.6",">= 17, < 17.11",">= 16, < 16.15",">= 15, < 15.19","< 14.24"]}],"workarounds":{"items":["use \"pg_restore --dbname\" instead of restore methods that involve \"psql\""],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-13T00:00:00+00:00","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-57852","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-cve-2025-8714-family-cve-2025-8714","parents":[{"from":"CVE-2025-8714","to":"CVE-2026-18408","relation":"regression","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"regression","quote":"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.","from":"CVE.org","in":"CVE-2026-18408"}]}]}}