CVE-2025-8715
Reported by postgresql · Published August 14, 2025
Improper neutralization of newlines in pg_dump in PostgreSQL allows a user 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 inside a purpose-crafted object name. The same attacks can achieve SQL injection as a superuser of the restore target server. pg_dumpall, pg_restore, and pg_upgrade are also affected. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected. Versions before 11.20 are unaffected. CVE-2012-0868 had fixed this class of problem, but version 11.20 reintroduced it.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| postgresql16-plperl | Amazon Linux | 16.10-1.amzn2023.0.1 |
| postgresql17-plpython3 | Amazon Linux | 17.6-1.amzn2023.0.1 |
| postgresql17 | Alpine | 17.6-r0 |
| postgresql17-upgrade | Amazon Linux | 17.6-1.amzn2023.0.1 |
| postgresql15-plperl | Amazon Linux | 15.14-1.amzn2023.0.1 |
| postgresql15 | Amazon Linux | 15.14-1.amzn2023.0.1 |
| postgresql17-pltcl | Amazon Linux | 17.6-1.amzn2023.0.1 |
| postgresql15-private-devel | Amazon Linux | 15.14-1.amzn2023.0.1 |
| postgresql16-test | Amazon Linux | 16.10-1.amzn2023.0.1 |
| postgresql15-plpython3 | Amazon Linux | 15.14-1.amzn2023.0.1 |
| postgresql16-test-rpm-macros | Amazon Linux | 16.10-1.amzn2023.0.1 |
| postgresql16 | Alpine | 16.10-r0 |
42 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | PostgreSQL | 17, 16, 15 |
| amazon:2023 | postgresql16-plperl | 0 |
| amazon:2023 | postgresql17-plpython3 | 0 |
| alpine | postgresql17 | 0 |
| amazon:2023 | postgresql17-upgrade | 0 |
| amazon:2023 | postgresql15-plperl | 0 |
| amazon:2023 | postgresql15 | 0 |
| amazon:2023 | postgresql17-pltcl | 0 |
| amazon:2023 | postgresql15-private-devel | 0 |
| amazon:2023 | postgresql16-test | 0 |
| amazon:2023 | postgresql15-plpython3 | 0 |
| amazon:2023 | postgresql16-test-rpm-macros | 0 |
| alpine | postgresql16 | 0 |
| amazon:2023 | postgresql17-docs | 0 |
| n/a | PostgreSQL | 14, 17, 16 |
| amazon:2023 | postgresql16-upgrade-devel | 0 |
| amazon:2023 | postgresql16-server | 0 |
| amazon:2023 | postgresql16-private-libs | 0 |
| amazon:2023 | postgresql15-pltcl | 0 |
| amazon:2023 | postgresql15-test | 0 |
…and 33 more
Timeline
- Aug 14, 2025 CVE Published
- Aug 15, 2025 EPSS Score (30 in total, the first dated here)
- Feb 26, 2026 CVE Updated
- Mar 26, 2026 Coalition ESS Score (2 in total, the first dated here)
- Apr 18, 2026 PoC Published
- Jun 2, 2026 Security Advisory (29 in total, the first dated here)
- Oct 21, 2026 Distribution Patch (22 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-8715
vulnetix vdb fixes CVE-2025-8715
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-8715/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart