# CVE-2025-8715: PostgreSQL pg\_dump newline in object name executes arbitrary code in psql client and in restore target server

- 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: 2025-08-14 · Modified: 2026-02-26
- Aliases: ALPINE-CVE-2025-8715, RHSA-2025:15115, UBUNTU-CVE-2025-8715, DEBIAN-CVE-2025-8715
- Record: https://cvemate.com/vulnerability/CVE-2025-8715 · JSON: https://cvemate.com/vulnerability/CVE-2025-8715/json

## Description

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

## 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.493%, percentile 43.94%, 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 46)

- alpine postgresql15 (Alpine Linux): \< 15.14-r0 \| \< 15.17-r0
- alpine postgresql16 (Alpine Linux): \< 16.10-r0
- alpine postgresql17 (Alpine Linux): \< 17.6-r0
- debian postgresql-15 (Debian): \< 15.14-0+deb12u1
- debian postgresql-17 (Debian): \< 17.6-0+deb13u1
- ubuntu postgresql-10 (Ubuntu): All versions (No fix recorded)
- ubuntu postgresql-12 (Ubuntu): All versions (No fix recorded)
- ubuntu postgresql-14 (Ubuntu): \< 14.19-0ubuntu0.22.04.1
- ubuntu postgresql-16 (Ubuntu): \< 16.10-0ubuntu0.24.04.1
- ubuntu postgresql-17 (Ubuntu): \< 17.6-1
- ubuntu postgresql-9.3 (Ubuntu): All versions (No fix recorded)
- ubuntu postgresql-9.5 (Ubuntu): All versions (No fix recorded)
- redhat pg\_repack (Red Hat): \< 0:1.4.6-3.module+el8.9.0+19330+c97ddbdf
- redhat pg\_repack-debuginfo (Red Hat): \< 0:1.4.6-3.module+el8.9.0+19330+c97ddbdf
- redhat pg\_repack-debugsource (Red Hat): \< 0:1.4.6-3.module+el8.9.0+19330+c97ddbdf
- redhat pgaudit (Red Hat): \< 0:1.4.0-7.module+el8.10.0+22214+9beb89d6
- redhat pgaudit-debuginfo (Red Hat): \< 0:1.4.0-7.module+el8.10.0+22214+9beb89d6
- redhat pgaudit-debugsource (Red Hat): \< 0:1.4.0-7.module+el8.10.0+22214+9beb89d6
- redhat postgres-decoderbufs (Red Hat): \< 0:0.10.0-2.module+el8.9.0+19330+c97ddbdf
- redhat postgres-decoderbufs-debuginfo (Red Hat): \< 0:0.10.0-2.module+el8.9.0+19330+c97ddbdf

## References

- <https://www.postgresql.org/support/security/CVE-2025-8715/>
- <https://security.alpinelinux.org/vuln/CVE-2025-8715>
- <https://access.redhat.com/errata/RHSA-2025:15115>
- <https://access.redhat.com/security/updates/classification/#important>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2388551>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2388553>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2025/rhsa-2025_15115.json>
- <https://access.redhat.com/security/cve/CVE-2025-8715>
- <https://www.cve.org/CVERecord?id=CVE-2025-8715>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-8715>
- <https://ubuntu.com/security/CVE-2025-8715>
- <https://www.postgresql.org/about/news/postgresql-176-1610-1514-1419-1322-and-18-beta-3-released-3118/>
- <https://ubuntu.com/security/notices/USN-7741-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-8715>

---

Data as of 2026-12-05T04:11:15.438Z. 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
