{"id":"ALPINE-CVE-2026-18408","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.","modified":"2026-09-14T16:18:08.119654154Z","published":"2026-08-13T13:17:48.127Z","upstream":["CVE-2026-18408"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2026-18408"}],"affected":[{"package":{"name":"postgresql16","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/postgresql16?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"16.15-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}},{"package":{"name":"postgresql16","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/postgresql16?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"16.15-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}},{"package":{"name":"postgresql17","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/postgresql17?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"17.11-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}},{"package":{"name":"postgresql17","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/postgresql17?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"17.11-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}},{"package":{"name":"postgresql17","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/postgresql17?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"17.11-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}},{"package":{"name":"postgresql17","ecosystem":"Alpine:v3.24","purl":"pkg:apk/alpine/postgresql17?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"17.11-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}},{"package":{"name":"postgresql18","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/postgresql18?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"18.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}},{"package":{"name":"postgresql18","ecosystem":"Alpine:v3.24","purl":"pkg:apk/alpine/postgresql18?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"18.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-18408.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}