vendor:
phppgadmin
by:
Valerio Severini
9.8
CVSS
HIGH
Remote Command Execution
78
CWE
Product Name: phppgadmin
Affected Version From: 7.13.0
Affected Version To: 7.13.0
Patch Exists: YES
Related CWE: N/A
CPE: a:phppgadmin:phppgadmin:7.13.0
Metasploit:
N/A
Other Scripts:
N/A
Platforms Tested: Debian 10 and Ubuntu
2021
phpPgAdmin 7.13.0 – COPY FROM PROGRAM Command Execution (Authenticated)
phpPgAdmin through 7.13.0 allows remote authenticated users to execute arbitrary code. An attacker can create a table named cmd_exec with one column, add type=text and cmd_out, and try to execute the query via a SQL tab. It will fail because of restrictions on statements. However, the attacker can bypass this step by uploading a .txt file (containing a SQL statement such as "COPY cmd_exec FROM PROGRAM" followed by OS commands) in the Browse bar. This achieves remote command execution via a "SELECT * FROM cmd_exec" statement.
Mitigation:
Restrict access to the phpPgAdmin application and ensure that only trusted users have access to the application.