CVE-2026-18408: Inclusion of Functionality from Untrusted Control Sphere in 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. Versions before PostgreSQL 18.5, 17.11, 16.15, 15.19, and 14.24 are affected.
AI Analysis
Technical Summary
This vulnerability arises from the inclusion of untrusted data in pg_dump and related tools in PostgreSQL. A malicious superuser on the source server can craft dump files that include arbitrary code executed at restore time by the client operating system account running psql. The attack vector involves the psql \restrict and \unrestrict meta-commands, where \unrestrict was found to be sufficient to enable the attack despite earlier mitigations. Affected components include pg_dump, pg_dumpall, and pg_restore (when used with plain-format dumps). Versions prior to PostgreSQL 14.24, 15.19, 16.15, 17.11, and 18.5 are vulnerable.
Potential Impact
Successful exploitation allows a malicious superuser on the origin server to execute arbitrary code on the client machine during the restore process, running with the privileges of the client OS account executing psql. This can lead to full compromise of the client system, including confidentiality, integrity, and availability impacts.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability description notes that fixes were introduced in PostgreSQL versions 14.24, 15.19, 16.15, 17.11, and 18.5. Users should upgrade to these or later versions to mitigate the vulnerability. Until patched, avoid restoring dumps from untrusted sources and restrict superuser access on origin servers.
CVE-2026-18408: Inclusion of Functionality from Untrusted Control Sphere in PostgreSQL
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 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.5, 17.11, 16.15, 15.19, and 14.24 are affected.
CVSS v3.1
Score 8.8high
Affected software
pkg:deb/postgresql/postgresqlRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability arises from the inclusion of untrusted data in pg_dump and related tools in PostgreSQL. A malicious superuser on the source server can craft dump files that include arbitrary code executed at restore time by the client operating system account running psql. The attack vector involves the psql \restrict and \unrestrict meta-commands, where \unrestrict was found to be sufficient to enable the attack despite earlier mitigations. Affected components include pg_dump, pg_dumpall, and pg_restore (when used with plain-format dumps). Versions prior to PostgreSQL 14.24, 15.19, 16.15, 17.11, and 18.5 are vulnerable.
Potential Impact
Successful exploitation allows a malicious superuser on the origin server to execute arbitrary code on the client machine during the restore process, running with the privileges of the client OS account executing psql. This can lead to full compromise of the client system, including confidentiality, integrity, and availability impacts.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability description notes that fixes were introduced in PostgreSQL versions 14.24, 15.19, 16.15, 17.11, and 18.5. Users should upgrade to these or later versions to mitigate the vulnerability. Until patched, avoid restoring dumps from untrusted sources and restrict superuser access on origin servers.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PostgreSQL
- Date Reserved
- 2026-07-30T16:28:38.730Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7dc619bf8831d5393e5403
Added to database: 08/13/2026, 13:26:49 UTC
Last enriched: 08/13/2026, 13:41:55 UTC
Last updated: 08/13/2026, 20:00:22 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.