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
Tools/GitHubGitHub/i3r1h0n/pgadminopendoor
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubi3r1h0n/pgadminopendoor

pgAdminOpendoor

Exploit and test stand for CVE-2025-2945

View Repository
110 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

pgAdminOpendoor (CVE-2025-2945)

Overview

This is my research on CVE-2025-2945. This repo includes a test stand with postgress and vulnerable pgadmin, and exploit.

CVE

Usefull links:

  • NVD Details
  • WIZ Analyze
  • Metasploit

Breakdown

In pgAdmin backend, which is written in python, there are two endpoint with lack of proper sanitization. Endpoints are:

  • /sqleditor/query_tool/download - query_commited parameter
  • /cloud/deploy - high_availability parameter

Let's look at the code of sqleditor:

Download Tool
root@kitploit:~
for key, value in data.items():
    if key == 'query':
        sql = value
    if key == 'query_commited':
        query_commited = (
            eval(value) if isinstance(value, str) else value
        )

What we see here, is the value of query_commited been directly passed to eval() function. You can see the docs for eval.

Also see the code of pgacloud:

root@kitploit:~
def _create_google_postgresql_instance(self, args):
    credentials = self._get_credentials(self._scopes)
    service = discovery.build('sqladmin', 'v1beta4',
                              credentials=credentials)
    high_availability = \
        'REGIONAL' if eval(args.high_availability) else 'ZONAL'

Same problem here.

It still requires a valid creds and access to pgadmin to reach this endpoints. But any attacker, able to access it, is also able to pass any value to eval. Which is equal to executing any python oneliner.

Exploitation

Exploitation is pretty straight-forward. See the exploit/src/main.py. Don't forget to update the config in order to get a reverse shell.

Stand Setup

To setup stand run this:

root@kitploit:~
cd stand
docker compose up -d

And that's it. pgAdmin is now accessable at http://localhost:8080. Default creds are:

root@kitploit:~
[email protected]
admin

Feel free to edit the .env file and stand/init-db/01-init.sql.


prod by I3r1h0n.