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:H

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.

CVE Program

Exploit source choices

5 sources
pgAdmin Query Tool authenticated RCE (CVE-2025-2945)
MSF-multi--http--pgadmin_query_tool_authenticatedMetasploitPython / remotePreferred

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.

2025-04-03pgadmin_query_tool_authenticated.rb
cycloctane/cve-2025-2945-poc
GH-91d74edaed48d0c859bf8969b63a844dGitHubUnofficial GitHub source

Python PoC script for pgAdmin4 Query Tool RCE (CVE-2025-2945)

2025-09-133 files · 9 stars
i3r1h0n/pgadminopendoor
GH-677e08aeed0f5e0880c98afc3129f5beGitHubUnofficial GitHub source

Exploit and test stand for CVE-2025-2945

2025-11-1011 files · 1 stars