CVE-2025-8715
BaseFortify
Publication date: 2025-08-14
Last updated on: 2025-08-15
Assigner: PostgreSQL
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| postgresql | postgresql | 13.22 |
| postgresql | pg_dump | * |
| postgresql | postgresql | 16.10 |
| postgresql | pg_restore | * |
| postgresql | pg_upgrade | * |
| postgresql | postgresql | 14.19 |
| postgresql | postgresql | 17.6 |
| postgresql | postgresql | 15.14 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-93 | The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability involves improper neutralization of newlines in the pg_dump utility of PostgreSQL. It allows a user on the origin server to inject arbitrary code that will execute during the restore process as the client operating system account running psql. This is done via psql meta-commands embedded inside specially crafted object names. Additionally, the same technique can be used to perform SQL injection if the attacker is a superuser on the restore target server. Other PostgreSQL utilities like pg_dumpall, pg_restore, and pg_upgrade are also affected.
How can this vulnerability impact me? :
This vulnerability can lead to arbitrary code execution on the client machine during database restore operations, potentially compromising the client system. It can also allow SQL injection attacks on the target server if the attacker has superuser privileges, leading to unauthorized data access, data modification, or disruption of database availability.
What immediate steps should I take to mitigate this vulnerability?
Upgrade PostgreSQL to version 17.6, 16.10, 15.14, 14.19, or 13.22 or later, as versions before these are affected. Avoid using affected versions for pg_dump, pg_dumpall, pg_restore, and pg_upgrade until upgraded.