Critical Remote Code Execution Vulnerability in pgAdmin 4 (CVE-2025-13780) Enables Server Takeover
Vulnerability Disclosure · 2 sources · Updated 5mo ago · First seen Dec 15, 2025

A critical remote code execution vulnerability, tracked as CVE-2025-13780, was discovered in pgAdmin 4, the widely used open-source PostgreSQL database management tool. The flaw allows attackers to bypass security filters in the plain-text restore feature by inserting unexpected whitespace characters, enabling the execution of arbitrary shell commands on the host server through maliciously crafted SQL dump files. The vulnerability affects pgAdmin 4 versions prior to 9.11 and was found to stem from an inadequate regular expression filter that failed to block dangerous commands effectively.
Security researchers at EndorLabs identified the issue and reported that attackers could exploit this weakness to gain unauthorized access and potentially take over affected servers. In response, the pgAdmin development team released version 9.11, which implements the \restrict command to disable hazardous operations during the restore process, fundamentally improving the security model by enforcing restrictions at the execution level rather than relying solely on input filtering. Users are strongly advised to update to the latest version to mitigate the risk of exploitation.


