CVE-2025-8715: PostgreSQL pg_dump newline in object name executes arbitrary code in psql client and in restore target server

Published Aug 14, 2025
·
Updated

Improper neutralization of newlines in pgdump 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. pgdumpall, pgrestore, and pgupgrade 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.

Other sources

PostgreSQL pgdump newline in object name executes arbitrary code in psql client and in restore target server

Microsoft

Affected Software

3 affected componentsFixes available
PostgreSQL postgresql<17.6, <16.10, <15.14, <14.19, <13.22
Microsoft azl3 postgresql 16.9-1
Microsoft cbl2 postgresql 14.18-1

Event History

Aug 14, 2025
CVE Published
via MITRE·01:00 PM
Data Sourced
via MITRE·01:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·02:01 PM
DescriptionSeverityAffected Software
Sep 4, 2025
Data Sourced
via Microsoft·07:09 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:09 AM
Affected Software
Updated
via Microsoft·07:09 AM
Affected Software
Updated
via Microsoft·07:09 AM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-8715?

CVE-2025-8715 has been classified as a high-severity vulnerability due to the potential for arbitrary code execution during the restore process.

2

How do I fix CVE-2025-8715?

To mitigate CVE-2025-8715, upgrade PostgreSQL to version 13.23 or later, or version 11.21 or later if using the older series.

3

Who is affected by CVE-2025-8715?

CVE-2025-8715 affects users of PostgreSQL versions prior to 11.21 and between 13.22 and 17.6, specifically during the use of pg_dump and related tools.

4

What impact does CVE-2025-8715 have on PostgreSQL users?

CVE-2025-8715 can allow attackers to execute arbitrary code on the PostgreSQL server operating system during the restoration of a compromised dump.

5

Is there a workaround for CVE-2025-8715 before upgrading?

A temporary workaround for CVE-2025-8715 is to avoid using pg_dump for generating dumps that may include untrusted data until the software is upgraded.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203