
pgAdmin Proof of Concept
pgAdmin Proof of Concept
⚠️ Disclaimer
This repository contains a proof-of-concept exploit for CVE-2025-2945, a critical remote code execution vulnerability in pgAdmin 4 versions prior to 9.2. Use this code only in environments you own or have explicit permission to test. The author is not responsible for any misuse or damage caused by this software.
This repository provides a standalone Python script—pgadmin_rce.py—that replicates the functionality of the Metasploit module for CVE-2025-2945. When run against a vulnerable pgAdmin 4 instance (versions 8.10–9.1), it will:
query_commitedeval()Because the vulnerable endpoints rely on Python’s built-in eval() without sanitizing user input, an authenticated user can force pgAdmin to run arbitrary Python code on the host machine, resulting in full RCE.
query_commited (or high_availability in the Cloud Deployment module) parameter to an eval() call on the server, resulting in arbitrary code execution under the pgAdmin service account.Python 3.7+
Python packages (install via pip):
requestsfakerpip install requests faker