PostgreSQL
PostgreSQL pg_dump lets superuser of origin server execute arbitrary code in psql client
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 meta-commands. pg_dumpall is also affected. pg_restore is affected when used to generate a plain-format dump. This is similar to MySQL CVE-2024-21096. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 17, < 17.6
- >= 16, < 16.10
- >= 15, < 15.14
- >= 14, < 14.19
- < 13.22
Fixed in 17.6, 16.10, 15.14, 14.19, 13.22
Mitigation
Upgrade PostgreSQL to 17.6 or 16.10 or 15.14 or 14.19 or 13.22 or later.
Workaround
use "pg_restore --dbname" instead of restore methods that involve "psql"
Timeline
Days relative to CVE publicationFirst public PoC 17 days after publication; not in CISA KEV. First PoC: orderby99/CVE-2025-8714-POC (created 31 Aug 2025, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| orderby99/CVE-2025-8714-POC | 31 Aug 2025 +17 d | 2 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.