CVE-2026-18408
8.8PostgreSQL · PostgreSQL
A vulnerability in PostgreSQL pg_dump allows a malicious superuser on an origin server to inject arbitrary code that executes during restoration on a client system via psql meta-commands.
Executive summary
A critical vulnerability in PostgreSQL pg_dump allows for remote code execution on client systems during the restoration of database dumps originating from a compromised server.
Vulnerability
This vulnerability involves the inclusion of functionality from an untrusted control sphere (CWE-829) during the pg_dump process. A malicious database superuser can inject arbitrary code into the dump file, which executes with the privileges of the operating system account performing the restore via the psql command.
Business impact
With a CVSS score of 8.8, this flaw poses a severe risk to administrative workstations and backup servers. A successful exploit could lead to full compromise of the client operating system, resulting in lateral movement within the network or the theft of sensitive credentials and data stored on the client machine.
Remediation
Immediate Action: Update all PostgreSQL installations to the latest version and exercise extreme caution when restoring database dumps from untrusted or external sources.
Proactive Monitoring: Monitor restoration activities for the execution of unexpected psql meta-commands or anomalous child processes spawned by the restore operation.
Compensating Controls: Ensure that database restores are performed within isolated or hardened environments to limit the impact of potential code execution.
Exploitation status
Public Exploit Available: Unknown
Analyst recommendation
This vulnerability highlights the risks associated with trusting external database dump files. Administrators should apply the provided updates and implement strict policies regarding the origin of database backups to prevent potential code execution.