ReviewHigh

CVE-2026-18408

PostgreSQL, postgresql

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. Versio...

CVSS
8.8
EPSS
0.36%
29.2% percentile
CISA KEV
Not listed
Published
2026.08.13
PRIORITY ASSESSMENT

Review

The CVSS severity warrants an early asset and exposure review.

Known exploitationNot established by KEV
Exploit probability0.36%
Technical severityCVSS 8.8

Vulnerability overview

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. Versio...

Affected product and versions

Product
PostgreSQL, postgresql
Affected versions
>= 18 < 18.5, >= 17 < 17.11, >= 16 < 16.15, >= 15 < 15.19, >= 14.0 < 14.24, >= 15.0 < 15.19, >= 16.0 < 16.15, >= 17.0 < 17.11, >= 18.0 < 18.5
Fixed versions
Verify the fixed release separately for each affected product line

Recommended response sequence

Confirm exposure before applying a vendor-supported change.

Full remediation guide
  1. 1
    Identify

    Confirm that PostgreSQL, postgresql and an affected version are present.

  2. 2
    Prioritize

    Combine exploitation signals with asset exposure and business criticality.

  3. 3
    Remediate

    Follow the vendor advisory or supported update path and preserve rollback options.

  4. 4
    Verify

    Recheck the version, service health, access paths, and relevant logs.

Technical data

CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE
CWE-829
CVE-2026-18408 — PostgreSQL, postgresql | SECUFOCUS NOW