Executive brief
pgAdmin is a web-based database management tool used by database administrators to manage PostgreSQL databases. The vulnerability allows authenticated attackers to execute arbitrary code on the server running pgAdmin through a flaw in the validate binary path API. An attacker with valid credentials could compromise the entire server and gain access to sensitive database contents.
Technical details
pgAdmin versions through 8.4 contain a Remote Code Execution vulnerability in the validate binary path API endpoint. The vulnerability is a command injection issue (CWE-77) where user-supplied input is not properly sanitized before being passed to system commands. An authenticated user can exploit this by crafting a malicious payload in the binary path validation parameter to execute arbitrary operating system commands. The vulnerability requires authentication to trigger but allows an authenticated user to execute code with the privileges of the pgAdmin server process. A patch was released in pgAdmin 8.5.
Affected products
- pgAdmin pgAdmin <= 8.4 (fixed in 8.5)
Timeline
- 2024-03-28: disclosed: Vulnerability reported on GitHub
- 2024-04-04: advisory: Security advisory published
- 2024-04-04: patched: Patch released in version 8.5