Vulnerability record · CVE-2025-2945 · published 3 April 2025
CVE-2025-2945: pgAdmin 4 eval() code injection in Query Tool and Cloud Deployment
Pgadmin · Pgadmin 4
pgAdmin 4 before 9.2 passes the query_commited parameter of POST /sqleditor/query_tool/download and the high_availability parameter of POST /cloud/deploy unsafely into Python's eval(), allowing arbitrary code execution. Because pgAdmin is a widely deployed database administration tool, a successful attack can compromise the host running pgAdmin and any database credentials it holds.
Description
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.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Automated analysis
high priorityCVSS 8.8 with network reachability, low privileges required and full impact, plus a very high EPSS score and an exploit-tagged reference, make this a high-priority patch despite no KEV listing.
What it is
pgAdmin 4 before 9.2 passes the query_commited parameter of POST /sqleditor/query_tool/download and the high_availability parameter of POST /cloud/deploy unsafely into Python's eval(), allowing arbitrary code execution. Because pgAdmin is a widely deployed database administration tool, a successful attack can compromise the host running pgAdmin and any database credentials it holds.
Impact
An authenticated attacker gains arbitrary code execution on the pgAdmin server, leading to full compromise of confidentiality, integrity and availability of that host and the database connections it manages.
Attack surface
Reached over the network through two authenticated POST endpoints, /sqleditor/query_tool/download and /cloud/deploy; the CVSS vector shows PR:L and UI:N, so a low-privileged account is required and no user interaction is needed.
Exploitation
No CISA KEV listing and no ransomware association are recorded, but EPSS is 0.563 (99th percentile) and the single reference is tagged Exploit, indicating public exploit interest and a high likelihood of attempted exploitation.
What to do
- Upgrade pgAdmin 4 to version 9.2 or later, which is the fixed release per the advisory.
- If immediate upgrade is not possible, restrict network access to pgAdmin to trusted management networks and disable or block the /cloud/deploy and /sqleditor/query_tool/download endpoints where feasible.
- Audit and reduce pgAdmin accounts to the minimum needed, since exploitation requires an authenticated low-privileged session.
- Run pgAdmin with least privilege and avoid storing high-value database credentials in instances exposed to untrusted users.
- Monitor pgAdmin logs for anomalous POST requests to the two affected endpoints.
Detection
- Search pgAdmin HTTP logs for POST requests to /sqleditor/query_tool/download with a query_commited parameter and to /cloud/deploy with a high_availability parameter.
- Inspect those parameter values for Python code patterns such as __import__, os.system, subprocess, eval or base64-encoded payloads.
- Alert on unexpected child processes spawned by the pgAdmin Python process (for example shells, curl or wget).
- Correlate pgAdmin authentication events with subsequent requests to the two endpoints from the same account or source IP.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://github.com/pgadmin-org/pgadmin4/issues/8603 | ExploitIssue Tracking |
Track CVE-2025-2945 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2025-2945), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.