Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-2945-pgAdmin4-Authenticated-RCE-PoC- — Proof-of-concept exploit for authenticated remote code execution in pgAdmin4 (CVE-2025-2945) via SQL Editor abuse. Designed for authorized security testing and education. | Kitploit
Tools/GitHubGitHub/udayveer17/cve-2025-2945-pgadmin4-authenticated-rce-poc-
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationRed Teaming
GitHubudayveer17/cve-2025-2945-pgadmin4-authenticated-rce-poc-

CVE-2025-2945-pgAdmin4-Authenticated-RCE-PoC-

Proof-of-concept exploit for authenticated remote code execution in pgAdmin4 (CVE-2025-2945) via SQL Editor abuse. Designed for authorized security testing and education.

View Repository
239 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-2945 – pgAdmin4 Authenticated RCE (PoC)

This repository contains a proof-of-concept script created for security research and authorized penetration testing involving the vulnerability CVE-2025-2945, affecting certain versions of pgAdmin4.

The issue allows an authenticated pgAdmin user with access to the SQL Editor to trigger remote code execution by abusing the Query Tool panel initialization flow. This PoC demonstrates the vulnerability for educational, auditing, and defensive purposes only.


If You wnat to under stand how this cve and poc work read this article

  • (https://www.udayxd.xyz/write-up-blogs/cves-explain/cve-2025-2945)

⚠️ Legal & Ethical Notice

This tool is intended ONLY for:

  • Security researchers
  • Red Team operators with prior written authorization
  • System administrators validating their own infrastructure
  • Educational analysis of vulnerable flows

Do NOT use this tool on any system without explicit permission. Unauthorized use is illegal and unethical. The author is not responsible for misuse.


✔️ Features

  • Automatically checks vulnerable pgAdmin4 version (8.10 → 9.1)
  • Authenticates to pgAdmin4 and retrieves CSRF tokens
  • Detects a valid server ID
  • Initializes the SQL editor correctly (required for exploit chain)
  • Sends a payload through the Query Tool downloader endpoint
  • Supports custom database credentials
  • Supports custom listener IP/port (reverse shell payload)

🧠 Technical Summary

The vulnerability stems from logic flaws in the SQL Editor initialization endpoints. When interacting with /sqleditor/initialize/ and /sqleditor/panel/, the application mishandles user-controlled data, ultimately allowing crafted payloads to execute arbitrary backend commands.

The PoC exploits the following endpoint sequence:

  1. Authentication & CSRF retrieval
  2. Server connection lookup
  3. SQL Editor initialization
  4. Panel registration
  5. Payload delivery through the Query Tool download API

📦 Requirements

  • Python 3.x
  • requests library
  • Valid pgAdmin credentials
  • Valid database credentials
  • A controlled listener (e.g., Netcat) for tests in approved environments

🚀 Usage

Basic syntax

root@kitploit:~
python3 poc.py \
  --target-url <pgadmin-url> \
  --username <pgadmin-user> \
  --password <pgadmin-pass> \
  --db-user <db-username> \
  --db-pass <db-password> \
  --db-name <database> \
  --Rhost <your-ip> \
  --Rport <your-port>

(A full example is already provided in the script’s help section.)


📁 File Structure

root@kitploit:~
poc.py        → The exploit proof-of-concept
README.md     → Project documentation

🛡 Mitigation

Admins should:

  • Update pgAdmin4 to a patched version once available
  • Limit SQL Editor access to trusted admin accounts
  • Enforce MFA and strong passwords
  • Restrict pgAdmin network exposure
  • Monitor for suspicious SQL Editor requests

✨ Credits

Author: UdayVeer

  • X: https://x.com/udaypro2008
  • GitHub: https://github.com/ExtremeUday
  • LinkedIn: https://www.linkedin.com/in/uday-veer-8002a5360/
  • HackTheBox: ExtremeUday2

Download Tool