{"id":"BIT-postgresql-2026-18408","summary":"PostgreSQL psql \\unrestrict lets superuser of pg_dump origin server execute arbitrary code in psql client","details":"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.","aliases":["CVE-2026-18408"],"modified":"2026-09-08T08:48:18.552989305Z","published":"2026-08-19T08:52:54.056Z","database_specific":{"severity":"High","cpes":["cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*"]},"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-18408"},{"type":"ADVISORY","url":"https://www.postgresql.org/support/security/CVE-2026-18408/"}],"affected":[{"package":{"name":"postgresql","ecosystem":"Bitnami","purl":"pkg:bitnami/postgresql"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"14.24.0"},{"introduced":"15.0.0"},{"fixed":"15.19.0"},{"introduced":"16.0.0"},{"fixed":"16.15.0"},{"introduced":"17.0.0"},{"fixed":"17.11.0"},{"introduced":"18.0.0"},{"fixed":"18.5.0"}]}],"database_specific":{"source":"https://github.com/bitnami/vulndb/tree/main/data/postgresql/BIT-postgresql-2026-18408.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}],"schema_version":"1.9.0"}