CVE-2025-8715
published 2025-08-14CVE-2025-8715: 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…
PriorityP352high8.8CVSS 3.1
AVNACLPRNUIRSUCHIHAH
EPSS
0.39%
30.6th percentile
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.
Affected
5 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | postgresql-13 | < postgresql-13 13.22-0+deb11u1 (bullseye) | postgresql-13 13.22-0+deb11u1 (bullseye) |
| debian | postgresql-15 | < postgresql-13 13.22-0+deb11u1 (bullseye) | postgresql-13 13.22-0+deb11u1 (bullseye) |
| debian | postgresql-17 | < postgresql-13 13.22-0+deb11u1 (bullseye) | postgresql-13 13.22-0+deb11u1 (bullseye) |
| msrc | azl3_postgresql_16.9-1_on_azure_linux_3.0 | — | — |
| msrc | cbl2_postgresql_14.18-1_on_cbl_mariner_2.0 | — | — |
CVSS provenance
nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
osv6.8MEDIUM
vendor_msrc8.8HIGH
vendor_debian6.8MEDIUM
vendor_redhat6.8MEDIUM
vendor_ubuntu3.1LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
PostgreSQL vulnerabilities
vendor_ubuntu·2025-09-08·CVSS 3.1
CVE-2025-8713 [LOW] PostgreSQL vulnerabilities
Title: PostgreSQL vulnerabilities
Summary: Several security issues were fixed in PostgreSQL.
Dean Rasheed discovered that PostgreSQL incorrectly handled access control
lists. An attacker could possibly use this issue to obtain sensitive
information. (CVE-2025-8713)
Martin Rakhmanov, Matthieu Denais, and RyotaK discovered that the PostgreSQL
pg_dump utility allowed untrusted data inclusion. A malicious superuser
could use this issue to execute arbitrary code when a dump script is
reloaded. (CVE-2025-8714)
Noah Misch discovered that the PostgreSQL pg_dump utility incorrectly
filtered line breaks in object names. An attacker could create object names
that execute arbitrary SQL commands when a dump script is reloaded.
(CVE-2025-8715)
Instructions: This update uses a new upstream release,
Red Hat
postgresql: PostgreSQL executes arbitrary code in restore operation
vendor_redhat·2025-08-14·CVSS 6.8
CVE-2025-8715 [MEDIUM] CWE-93 postgresql: PostgreSQL executes arbitrary code in restore operation
postgresql: PostgreSQL executes arbitrary code in restore operation
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.
A flaw was found in PostgreSQL. This vulnerability allows a malicious user of the PostgreSQL server to i
Microsoft
PostgreSQL pg_dump newline in object name executes arbitrary code in psql client and in restore target server
vendor_msrc·2025-08-12·CVSS 8.8
CVE-2025-8715 [HIGH] CWE-93 PostgreSQL pg_dump newline in object name executes arbitrary code in psql client and in restore target server
PostgreSQL pg_dump newline in object name executes arbitrary code in psql client and in restore target server
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
PostgreSQL: PostgreSQL
Customer Action Required:
Debian
CVE-2025-8715: postgresql-13 - Improper neutralization of newlines in pg_dump in PostgreSQL allows a user of th...
vendor_debian·2025·CVSS 6.8
CVE-2025-8715 [MEDIUM] CVE-2025-8715: postgresql-13 - Improper neutralization of newlines in pg_dump in PostgreSQL allows a user of th...
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.
Scope: local
bullseye: resolved (fixed in 13.22-0+deb11u1)
OSV
postgresql-14, postgresql-16, postgresql-17 vulnerabilities
osv·2025-09-08·CVSS 3.1
CVE-2025-8713 [LOW] postgresql-14, postgresql-16, postgresql-17 vulnerabilities
postgresql-14, postgresql-16, postgresql-17 vulnerabilities
Dean Rasheed discovered that PostgreSQL incorrectly handled access control
lists. An attacker could possibly use this issue to obtain sensitive
information. (CVE-2025-8713)
Martin Rakhmanov, Matthieu Denais, and RyotaK discovered that the PostgreSQL
pg_dump utility allowed untrusted data inclusion. A malicious superuser
could use this issue to execute arbitrary code when a dump script is
reloaded. (CVE-2025-8714)
Noah Misch discovered that the PostgreSQL pg_dump utility incorrectly
filtered line breaks in object names. An attacker could create object names
that execute arbitrary SQL commands when a dump script is reloaded.
(CVE-2025-8715)
OSV
CVE-2025-8715: 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
osv·2025-08-14·CVSS 6.8
CVE-2025-8715 [MEDIUM] CVE-2025-8715: 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
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.
GHSA
GHSA-xh8r-9824-53cf: 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
ghsa_unreviewed·2025-08-14·CVSS 6.8
CVE-2025-8715 [MEDIUM] CWE-93 GHSA-xh8r-9824-53cf: 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
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.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2025-8715 postgresql16: PostgreSQL executes arbitrary code in restore operation [fedora-42]
bugzilla·2025-08-14·CVSS 8.8
CVE-2025-8715 [HIGH] CVE-2025-8715 postgresql16: PostgreSQL executes arbitrary code in restore operation [fedora-42]
CVE-2025-8715 postgresql16: PostgreSQL executes arbitrary code in restore operation [fedora-42]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
The following link provides references to all essential vulnerability management information. If something is wrong or missing, please contact a member of PSIRT.
https://spaces.redhat.com/display/PRODSEC/Vulnerability+Management+-+Essential+Documents+for+Engineering+Teams
Discussion:
This message is a reminder that Fedora Linux 42 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13.
It is Fedora's policy to close
Bugzilla
CVE-2025-8715 postgresql17: PostgreSQL executes arbitrary code in restore operation [fedora-42]
bugzilla·2025-08-14·CVSS 8.8
CVE-2025-8715 [HIGH] CVE-2025-8715 postgresql17: PostgreSQL executes arbitrary code in restore operation [fedora-42]
CVE-2025-8715 postgresql17: PostgreSQL executes arbitrary code in restore operation [fedora-42]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
The following link provides references to all essential vulnerability management information. If something is wrong or missing, please contact a member of PSIRT.
https://spaces.redhat.com/display/PRODSEC/Vulnerability+Management+-+Essential+Documents+for+Engineering+Teams
Discussion:
This message is a reminder that Fedora Linux 42 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13.
It is Fedora's policy to close
Bugzilla
CVE-2025-8715 mingw-postgresql: PostgreSQL executes arbitrary code in restore operation [fedora-42]
bugzilla·2025-08-14·CVSS 8.8
CVE-2025-8715 [HIGH] CVE-2025-8715 mingw-postgresql: PostgreSQL executes arbitrary code in restore operation [fedora-42]
CVE-2025-8715 mingw-postgresql: PostgreSQL executes arbitrary code in restore operation [fedora-42]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
The following link provides references to all essential vulnerability management information. If something is wrong or missing, please contact a member of PSIRT.
https://spaces.redhat.com/display/PRODSEC/Vulnerability+Management+-+Essential+Documents+for+Engineering+Teams
Discussion:
This message is a reminder that Fedora Linux 42 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13.
It is Fedora's policy to cl
2025-08-14
Published