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.
{
"license": "CC-BY-4.0",
"sources": [
{
"affected": {
"postgresql:postgresql": [
">= 14.0, < 14.24",
">= 15.0, < 15.19",
">= 16.0, < 16.15",
">= 17.0, < 17.11",
">= 18.0, < 18.5"
]
},
"database_specific": {
"status": "Modified"
},
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-18408",
"id": "CVE-2026-18408",
"imported": "2026-11-21T04:27:54.399Z",
"modified": "2026-08-29T23:17:20.843Z",
"published": "2026-08-13T13:17:48.127Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-18408"
}
]
}