CVE-2025-8714
8.8PostgreSQL · PostgreSQL
PostgreSQL pg_dump and related utilities are vulnerable to arbitrary code execution during restore operations due to the inclusion of untrusted data in dump files.
Executive summary
A critical security vulnerability in PostgreSQL allows a malicious actor to achieve remote code execution during database restore operations.
Vulnerability
This vulnerability involves the inclusion of functionality from an untrusted control sphere (CWE-829), where untrusted data within a dump file allows for arbitrary code injection. The vulnerability requires a user to perform a restore operation, executing the malicious code as the client operating system account running the restore process.
Business impact
The vulnerability carries a CVSS score of 8.8, indicating high severity. Successful exploitation could lead to full system compromise, as the injected code executes with the privileges of the user performing the database restoration. This poses significant risks to data integrity, confidentiality, and operational continuity, as an attacker could gain persistent access to the underlying host server.
Remediation
Immediate Action: Update all instances of PostgreSQL to the patched versions (17.6, 16.10, 15.14, 14.19, or 13.22) immediately as specified in the official vendor security advisory.
Proactive Monitoring: Review database restore logs for unusual activity and audit the provenance of any database dump files obtained from external or untrusted sources before performing a restoration.
Compensating Controls: Restrict the ability to run database restores to highly trusted administrators, and ensure that restoration processes are conducted within isolated, non-privileged environments to minimize potential impact.
Exploitation status
Public Exploit Available: Yes, a public proof-of-concept exists via a GitHub repository.
Analyst recommendation
Given the potential for complete system compromise and the existence of public proof-of-concept material, this vulnerability should be treated with high priority. Organizations must ensure that all database management software is updated to the latest secure versions provided by the vendor. Prioritize the auditing of any automated restore scripts that may ingest untrusted dump files to prevent accidental execution of malicious payloads.
More PostgreSQL CVEs
Sources
Originally found and disclosed by The PostgreSQL project thanks Martin Rakhmanov, Matthieu Denais, and RyotaK for reporting this problem., per the CVE Program record.