This module exploits a vulnerability in pgAdmin where an authenticated user can establish a connection to the query tool and send a specific payload in the query_commited POST parameter. This payload is directly executed via a Python eval() statement, resulting in remote code execution in versions prior to 9.2. To exploit this vulnerability, pgAdmin credentials are required. Additionally, in order to interact with the vulnerable SQL editor component, valid database credentials are necessary to initialize a session and obtain a transaction ID, which is required for the exploit.
Exploit database
Vulnerability
CVE-2025-2945
pgAdmin 4: Remote Code Execution in Query Tool and Cloud Deployment
Vulnerability details
- Score
- 9.9
- Severity
- critical
CVSS 3.1 · PostgreSQL
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HDescription
Remote Code Execution security vulnerability in pgAdmin 4 (Query Tool and Cloud Deployment modules). The vulnerability is associated with the 2 POST endpoints; /sqleditor/query_tool/download, where the query_commited parameter and /cloud/deploy endpoint, where the high_availability parameter is unsafely passed to the Python eval() function, allowing arbitrary code execution. This issue affects pgAdmin 4: before 9.2.
CVE ProgramExploit source choices
5 sourcespgAdmin Query Tool authenticated RCE (CVE-2025-2945)
2025-04-03pgadmin_query_tool_authenticated.rb
cycloctane/cve-2025-2945-poc
Python PoC script for pgAdmin4 Query Tool RCE (CVE-2025-2945)
2025-09-133 files · 9 stars
abrewer251/cve-2025-2945_pgadmin_poc
pgAdmin Proof of Concept
2025-06-033 files · 3 stars
udayveer17/cve-2025-2945-pgadmin4-authenticated-rce-poc-
udayveer17/cve-2025-2945-pgadmin4-authenticated-rce-poc- source repository
2025-11-262 files · 2 stars
i3r1h0n/pgadminopendoor
Exploit and test stand for CVE-2025-2945
2025-11-1011 files · 1 stars