# CVE-2026-18408: PostgreSQL psql \\unrestrict lets superuser of pg\_dump origin server execute arbitrary code in psql client

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-08-13 · Modified: 2026-08-29
- Aliases: ALPINE-CVE-2026-18408, RHSA-2026:79009, RHSA-2026:79027, RHSA-2026:79028, UBUNTU-CVE-2026-18408, DEBIAN-CVE-2026-18408, CGA-97f4-jv5f-f68g, CGA-j685-8j69-38gr, CGA-2gv4-qhq2-x6pf, CGA-2gvf-qxx6-8hw4, CGA-2jf7-67j8-mfj6, CGA-5wv2-v76c-vwvw, CGA-7m7m-8g57-x2cw, CGA-7whx-f6gx-8p3h, CGA-82r7-26wm-fwj8, CGA-8g9f-v9cc-8g4c, CGA-8j52-mcm3-676m, CGA-94m7-723h-wpj4, CGA-crw5-hxcp-h24q, CGA-fpm9-873v-5h8c, CGA-jc5p-m6vv-v3hw, CGA-mwpw-cjqh-pvc6, CGA-pm2c-vg72-mfxp, CGA-qc79-xghx-pvgv, CGA-v362-ppfj-2c4h, CGA-xccr-6497-q2rm
- Record: https://cvemate.com/vulnerability/CVE-2026-18408 · JSON: https://cvemate.com/vulnerability/CVE-2026-18408/json

## 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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.355%, percentile 31.267%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 69)

- alpine postgresql15 (Alpine Linux): \< 15.19-r0
- alpine postgresql16 (Alpine Linux): \< 16.15-r0
- alpine postgresql17 (Alpine Linux): \< 17.11-r0
- alpine postgresql18 (Alpine Linux): \< 18.5-r0
- chainguard postgresql-14 (Chainguard): \< 14.24-r0
- chainguard postgresql-14-client (Chainguard): \< 14.24-r0
- chainguard postgresql-15 (Chainguard): \< 15.19-r0
- chainguard postgresql-15-client (Chainguard): \< 15.19-r0
- chainguard postgresql-16 (Chainguard): \< 16.15-r0
- chainguard postgresql-16-client (Chainguard): \< 16.15-r0
- chainguard postgresql-17 (Chainguard): \< 17.11-r0
- chainguard postgresql-17-client (Chainguard): \< 17.11-r0
- chainguard postgresql-18 (Chainguard): \< 18.6-r0
- chainguard postgresql-18-client (Chainguard): \< 18.6-r0
- wolfi postgresql-14 (Wolfi): \< 14.24-r0
- wolfi postgresql-14-client (Wolfi): \< 14.24-r0
- wolfi postgresql-15 (Wolfi): \< 15.19-r0
- wolfi postgresql-15-client (Wolfi): \< 15.19-r0
- wolfi postgresql-16 (Wolfi): \< 16.15-r0
- wolfi postgresql-16-client (Wolfi): \< 16.15-r0

## References

- <https://www.postgresql.org/support/security/CVE-2026-18408/>
- <https://security.alpinelinux.org/vuln/CVE-2026-18408>
- <https://access.redhat.com/errata/RHSA-2026:79009>
- <https://access.redhat.com/security/updates/classification/#important>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2515303>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_79009.json>
- <https://access.redhat.com/security/cve/CVE-2026-18408>
- <https://www.cve.org/CVERecord?id=CVE-2026-18408>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-18408>
- <https://access.redhat.com/errata/RHSA-2026:79027>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_79027.json>
- <https://access.redhat.com/errata/RHSA-2026:79028>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_79028.json>
- <https://ubuntu.com/security/CVE-2026-18408>
- <https://www.postgresql.org/about/news/postgresql-186-1711-1615-1519-1424-and-19-beta-3-released-3365/>
- <https://ubuntu.com/security/notices/USN-8653-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-18408>

---

Data as of 2026-12-05T04:22:46.760Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
