CVE-2025-8715 json
PostgreSQL pg_dump newline in object name executes arbitrary code in psql client and in restore target server
published last yr. modified 4mo ago also BIT-postgresql-2025-8715 , EUVD-2025-24809
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 41%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami postgresql 13.22.0, 14.19.0, 15.14.0, 16.10.0, 17.6.0
- n/a PostgreSQL 13.22, 14.19, 15.14, 16.10, 17.6
- postgresql-15 Debian 12 15.14-0+deb12u1
- postgresql-17 Debian 13 17.6-0+deb13u1
debian advisories DEBIAN-CVE-2025-8715
- postgresql-14 Ubuntu 22.04 LTS 14.19-0ubuntu0.22.04.1
- postgresql-16 Ubuntu 24.04 LTS 16.10-0ubuntu0.24.04.1
- postgresql-17 Ubuntu 25.10 17.6-1
ubuntu advisories UBUNTU-CVE-2025-8715
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- pgaudit RHEL 8 1.4.0-7.module+el8.10.0+22214+9beb89d6
- pg_repack RHEL 8 1.4.6-3.module+el8.9.0+19330+c97ddbdf
- postgresql RHEL 8 12.22-5.module+el8.10.0+23469+cd66ea30
- postgresql-test RHEL 8 12.22-5.module+el8.10.0+23469+cd66ea30
- postgresql-pltcl RHEL 8 12.22-5.module+el8.10.0+23469+cd66ea30
- postgresql-plperl RHEL 8 12.22-5.module+el8.10.0+23469+cd66ea30
- postgresql-server RHEL 8 12.22-5.module+el8.10.0+23469+cd66ea30
- postgresql-contrib RHEL 8 12.22-5.module+el8.10.0+23469+cd66ea30
red hat advisories RHSA-2025:15361RHSA-2025:15359RHSA-2025:15114RHSA-2025:15115RHSA-2025:15062RHSA-2025:15057
- postgresql14 SLE Module for Package Hub 15 SP7, SLE Module for Package Hub 15 SP6, SLE Module for Legacy 15 SP7 +2 more 14.19-150600.16.20.1
- postgresql16 SLE Module for Server Applications 15 SP7, SLE Module for Server Applications 15 SP6, SLE Module for Package Hub 15 SP7 +4 more 16.10-150600.16.21.1
- postgresql15 SLE Module for Legacy 15 SP7, SLE Module for Legacy 15 SP6, openSUSE Leap 15.6 15.14-150600.16.20.1
- postgresql14 SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +12 more 14.19-150200.5.61.1
- postgresql15 SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +13 more 15.14-150200.5.44.1
- postgresql17 SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +12 more 17.6-150200.5.16.1
- postgresql13 SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES 15 SP4-LTSS +5 more 13.22-150200.5.75.2
- postgresql17 SLE Module for Server Applications 15 SP7, SLE Module for Server Applications 15 SP6, SLE Module for Package Hub 15 SP7 +4 more 17.6-150600.13.16.1
suse advisories SUSE-SU-2025:03019-2SUSE-SU-2025:03005-1SUSE-SU-2025:03005-2SUSE-SU-2025:03018-2SUSE-SU-2025:03031-1SUSE-SU-2025:03030-1
- postgresql17 openSUSE Tumbleweed 17.6-1.1
- postgresql13 openSUSE Tumbleweed 13.22-1.1
- postgresql14 openSUSE Tumbleweed 14.19-1.1
- postgresql15 openSUSE Tumbleweed 15.14-1.1
- postgresql16 openSUSE Tumbleweed 16.10-1.1
opensuse advisories openSUSE-SU-2025:15455-1openSUSE-SU-2025:15450-1openSUSE-SU-2025:15451-1openSUSE-SU-2025:15452-1openSUSE-SU-2025:15453-1
- pgaudit AlmaLinux 8 1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1
- pgaudit AlmaLinux 8 1.4.0-7.module_el8.10.0+3889+48cb11fb.alma.1
- pg_repack AlmaLinux 8 1.4.6-3.module_el8.9.0+3704+f1f917ce
- postgresql AlmaLinux 8 12.22-5.module_el8.10.0+4043+6cac3079
- postgresql-test AlmaLinux 8 12.22-5.module_el8.10.0+4043+6cac3079
- postgresql-pltcl AlmaLinux 8 12.22-5.module_el8.10.0+4043+6cac3079
- postgresql-plperl AlmaLinux 8 12.22-5.module_el8.10.0+4043+6cac3079
- postgresql-server AlmaLinux 8 12.22-5.module_el8.10.0+4043+6cac3079
almalinux advisories ALSA-2025:15115ALSA-2025:15021ALSA-2025:15022ALSA-2025:14826ALSA-2025:14827ALSA-2025:14862
- postgresql Rocky Linux 9 13.22-1.el9_6
- postgresql16 Rocky Linux 10 16.10-1.el10_0
- pgaudit Rocky Linux 9 16.0-1.module+el9.5.0+30638+72f697e1
- pg_repack Rocky Linux 9 1.5.1-1.module+el9.5.0+30638+72f697e1
- postgres-decoderbufs Rocky Linux 9 2.4.0-1.Final.module+el9.5.0+30638+72f697e1
- pgaudit Rocky Linux 9 1.7.0-1.module+el9.5.0+30637+4391fcca
- pg_repack Rocky Linux 9 1.4.8-2.module+el9.5.0+30637+4391fcca
- postgres-decoderbufs Rocky Linux 9 1.9.7-1.Final.module+el9.5.0+30637+4391fcca
rocky linux advisories RLSA-2025:14878RLSA-2025:14826RLSA-2025:14827RLSA-2025:14862RLSA-2025:14899RLSA-2025:15021
- postgresql15 Alpine 3.22, Alpine 3.20, Alpine 3.19 15.14-r0
- postgresql15 Alpine 3.21 15.17-r0
- postgresql16 Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 16.10-r0
- postgresql17 Alpine 3.24, Alpine 3.23, Alpine 3.22 +1 more 17.6-r0
alpine advisories ALPINE-CVE-2025-8715
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- postgresql Azure Linux 3.0 16.10-1
- postgresql CBL-Mariner 2.0 14.19-1
azure linux advisories AZL-66306AZL-66327
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Is CVE-2025-8715 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-8715 updated cvss 8.8
postgresql: PostgreSQL executes arbitrary code in restore operation
-
Red Hat Enterprise Linux 6 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +2 moreaffected: workaround, no fix planned “Do not restore a dump file from a server or user you do not explicitly trust.”
-
Red Hat CodeReady Linux Builder EUS (v.9.4) postgresql-test 13.22-1.el9_4fixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15114
-
Red Hat Enterprise Linux AppStream (v. 8) pgaudit 1.5.0-1.module+el8.9.0+20664+9c30cf7f, pgaudit 1.7.0-1.module+el8.9.0+19797+c4ce5969, pgaudit 16.0-1.module+el8.10.0+20413+d8116364, pgaudit 1.4.0-7.module+el8.10.0+22214+9beb89d6, pg_repack 1.4.6-3.module+el8.9.0+19330+c97ddbdf, pg_repack 1.4.6-3.module+el8.9.0+20664+9c30cf7f, +44 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15115
-
Red Hat Enterprise Linux AppStream (v. 9) postgresql 13.22-1.el9_6, postgresql-pltcl 13.22-1.el9_6, postgresql-plperl 13.22-1.el9_6, postgresql-server 13.22-1.el9_6, postgresql-contrib 13.22-1.el9_6, postgresql-upgrade 13.22-1.el9_6, +29 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:14862
-
Red Hat Enterprise Linux AppStream (v. 10) postgresql 16.10-1.el10_0, postgresql16 16.10-1.el10_0, postgresql-test 16.10-1.el10_0, postgresql-pltcl 16.10-1.el10_0, postgresql-plperl 16.10-1.el10_0, postgresql-server 16.10-1.el10_0, +4 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:14826
-
Red Hat Enterprise Linux AppStream AUS (v. 8.2) pgaudit 1.4.0-4.module+el8.2.0+9043+1dbb5661, postgresql 12.22-1.module+el8.2.0+23452+508bd26b.2, postgresql-test 12.22-1.module+el8.2.0+23452+508bd26b.2, postgresql-pltcl 12.22-1.module+el8.2.0+23452+508bd26b.2, postgresql-plperl 12.22-1.module+el8.2.0+23452+508bd26b.2, postgresql-server 12.22-1.module+el8.2.0+23452+508bd26b.2, +5 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15361
-
Red Hat Enterprise Linux AppStream AUS (v.8.4) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-6.module+el8.4.0+11288+c193d6d7, postgresql 13.22-1.module+el8.4.0+23428+e8cf4671, postgresql 12.22-1.module+el8.4.0+23436+e3f9c044.2, postgresql-test 13.22-1.module+el8.4.0+23428+e8cf4671, postgresql-pltcl 13.22-1.module+el8.4.0+23428+e8cf4671, +16 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15034
-
Red Hat Enterprise Linux AppStream AUS (v.8.6) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, postgresql 12.22-1.module+el8.6.0+23437+7ab3a838.2, postgresql 13.22-1.module+el8.6.0+23444+2be3520b.1, +18 more Red Hat Enterprise Linux AppStream E4S (v.8.6) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, postgresql 12.22-1.module+el8.6.0+23437+7ab3a838.2, postgresql 13.22-1.module+el8.6.0+23444+2be3520b.1, +18 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15006
show 9 moreshow fewer
-
Red Hat Enterprise Linux AppStream E4S (v.8.8) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5, pgaudit 1.7.0-1.module+el8.8.0+17071+aaaceaa4, pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, pg_repack 1.4.8-1.module+el8.8.0+17071+aaaceaa4, +31 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15012
-
Red Hat Enterprise Linux AppStream E4S (v.9.0) postgresql 13.22-1.el9_0, postgresql-pltcl 13.22-1.el9_0, postgresql-plperl 13.22-1.el9_0, postgresql-server 13.22-1.el9_0, postgresql-contrib 13.22-1.el9_0, postgresql-upgrade 13.22-1.el9_0, +2 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:14870
-
Red Hat Enterprise Linux AppStream E4S (v.9.2) postgresql 13.22-1.el9_2, postgresql-pltcl 13.22-1.el9_2, postgresql-plperl 13.22-1.el9_2, postgresql-server 13.22-1.el9_2, postgresql-contrib 13.22-1.el9_2, postgresql-upgrade 13.22-1.el9_2, +15 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15062
-
Red Hat Enterprise Linux AppStream EUS (v.9.4) postgresql 13.22-1.el9_4, postgresql-pltcl 13.22-1.el9_4, postgresql-plperl 13.22-1.el9_4, postgresql-server 13.22-1.el9_4, postgresql-contrib 13.22-1.el9_4, postgresql-upgrade 13.22-1.el9_4, +28 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15014
-
Red Hat Enterprise Linux AppStream TUS (v.8.6) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, postgresql 12.22-1.module+el8.6.0+23437+7ab3a838.2, postgresql 13.22-1.module+el8.6.0+23444+2be3520b.1, +18 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15006
-
Red Hat Enterprise Linux AppStream TUS (v.8.8) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5, pgaudit 1.7.0-1.module+el8.8.0+17071+aaaceaa4, pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, pg_repack 1.4.8-1.module+el8.8.0+17071+aaaceaa4, +31 morefixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:15012
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) postgresql-test 13.22-1.el9_6, postgresql-test-rpm-macros 13.22-1.el9_6fixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:14878
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) postgresql-test-rpm-macros 16.10-1.el10_0fixed: vendor fix “Do not restore a dump file from a server or user you do not explicitly trust.” RHSA-2025:14826
-
Red Hat Enterprise Linux 7 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +3 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
0.47% chance of exploitation in the next 30 days, higher than 41% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | postgresql | >=11.20.0, <13.22.0 >=14.0.0, <14.19.0 >=15.0.0, <15.14.0 >=16.0.0, <16.10.0 >=17.0.0, <17.6.0 |
13.22.0 14.19.0 15.14.0 16.10.0 17.6.0 |
Affected products
- n/a PostgreSQL
Classification
- Weakness
-
- CWE-93 Improper Neutralization of CRLF Sequences
- Technology feeds
References
Sources
- CVE List CVE-2025-8715
- NVD CVE-2025-8715
- OSV BIT-postgresql-2025-8715
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.