CVE-2025-2945
PoC largeAuthenticated RCE via Python eval() in pgAdmin 4 Query Tool and Cloud Deployment
CVE-2025-2945 is a remote code execution vulnerability in pgAdmin 4 that arises from two POST endpoints passing user-controlled parameters directly into Python's eval() function (CWE-94, code injection). An attacker triggers it by sending crafted POST requests to /sqleditor/query_tool/download (query_commited parameter) or /cloud/deploy (high_availability parameter), causing arbitrary Python code to execute under the privileges of the pgAdmin server process. Successful exploitation yields full arbitrary code execution on the host running pgAdmin, consistent with the 8.8 (high) CVSS score; the vector (PR:L, UI:N) indicates a valid low-privileged pgAdmin login is required, with no user interaction needed. All pgAdmin 4 deployments before version 9.2 are affected, including server-mode, Docker, and desktop installations. The issue is not yet in CISA KEV, but a public proof-of-concept exists via the pgAdmin GitHub issue tracker and EPSS estimates a ~54% probability of exploitation within 30 days (99th percentile), so broad scanning and exploitation attempts are likely.
What to do: Upgrade to pgAdmin 4 9.2 or later, which removes the unsafe eval() handling in both endpoints. If upgrading is delayed, restrict network access to the pgAdmin web interface (bind to localhost, VPN, or IP allowlists), ensure authentication is enforced, and audit logs for unusual POST requests to /sqleditor/query_tool/download and /cloud/deploy. Defenders should prioritize patching internet-exposed pgAdmin servers given the public PoC and elevated EPSS score.
| pgAdmin 4 | before 9.2 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Vendors
- pgadmin
- Products
- pgadmin 4
- Weakness
- CWE-94
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H