{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-18408","id":"CVE-2026-18408","title":"PostgreSQL psql \\unrestrict lets superuser of pg_dump origin server execute arbitrary code in psql client","description":"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 fo","descriptionLong":"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.","published":"2026-08-13T13:00:14.898Z","updated":"2026-08-29T23:17:20.843Z","reserved":"2026-07-30T16:28:38.730Z","status":"Modified","rejected":false,"assigner":"PostgreSQL","metric":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"PostgreSQL"},"metrics":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"PostgreSQL"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007"}],"rating":"high","products":["PostgreSQL"],"affectedProducts":[{"vendor":"n/a","product":"PostgreSQL","defaultStatus":"unaffected","versions":[{"lessThan":"18.6","status":"affected","version":"18","versionType":"rpm"},{"lessThan":"17.11","status":"affected","version":"17","versionType":"rpm"},{"lessThan":"16.15","status":"affected","version":"16","versionType":"rpm"},{"lessThan":"15.19","status":"affected","version":"15","versionType":"rpm"},{"lessThan":"14.24","status":"affected","version":"0","versionType":"rpm"}],"platforms":[]}],"packages":[],"cwes":["CWE-829"],"aliases":[],"references":[{"url":"https://www.postgresql.org/support/security/CVE-2026-18408/","tags":["Vendor Advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00355,"epssPercentile":0.29891,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-18408","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-18408","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-18408","ok":false,"note":"no open-source package data"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-18408","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["postgresql"],"critical":[],"attention":null}