{"answers":{"affected":"3 open source packages ship an affected version, including github.com/siyuan-note/siyuan/kernel.","exploited":"There is no known exploitation of GHSA-4r66-7rcv-x46x in the wild and no public exploit code.","fix":"No fix has been published for GHSA-4r66-7rcv-x46x yet. Limit exposure of the affected software until one is available.","what":"GHSA-4r66-7rcv-x46x is a path traversal vulnerability in github.com/siyuan-note/siyuan/kernel, published on 9 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-4r66-7rcv-x46x and fix it if it is affected.\n\nWhat it is: GHSA-4r66-7rcv-x46x is a path traversal vulnerability in github.com/siyuan-note/siyuan/kernel, published on 9 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-4r66-7rcv-x46x in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/siyuan-note/siyuan/kernel (Go): affected all versions; no fix listed\n- github.com/siyuan-note/siyuan/kernel (Go): affected all versions up to 0.0.0-20251202123337-6ef83b42c7ce; no fix listed\n- github.com/siyuan-note/siyuan/kernel (Go): affected all versions up to 0.0.0-20251202123337-6ef83b42c7ce; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-4r66-7rcv-x46x/ (Markdown: https://insights.sbomify.com/GHSA-4r66-7rcv-x46x/index.md)","id":"GHSA-4r66-7rcv-x46x","markdown":"https://insights.sbomify.com/GHSA-4r66-7rcv-x46x/index.md","name":"GHSA-4r66-7rcv-x46x","record":{"aliases":["GO-2025-4219"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"SiYuan note-taking app","requires_auth":"low_privilege","summary":"Authenticated attackers can achieve remote code execution by exploiting a Zip Slip vulnerability to overwrite executables and trigger them via Pandoc settings.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\nSiyuan is vulnerable to RCE. The issue stems from a \"Zip Slip\" vulnerability during zip file extraction, combined with the ability to overwrite system executables and subsequently trigger their execution.\n\n### Steps to reproduce\n1. Authenticate\n2. Create zip slip payload with path traversal entry `../../../../opt/siyuan/startup.sh`. startup.sh contains malicious code like:\n```bash\n#!/bin/sh\necho 'you have been pwned' \u003e /siyuan/workspace/data/pwned.txt\necho \"pandoc 3.1.0\"\n```\n3. Upload zip to workspace via `/api/file/putFile`\n4. Extract zip via `/api/archive/unzip`, overwrites the existing executable `startup.sh` while maintaining the +x permission\n5. Trigger execution by calling `/api/setting/setExport` with `pandocBin=/opt/siyuan/startup.sh`. This calls `IsValidPandocBin()` which executes `startup.sh --version` that outputs \"pandoc 3.1.0\" and executes any arbitrary malicious code","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"SiYuan vulnerable to RCE via zip slip and Command Injection via PandocBin","id":"GHSA-4r66-7rcv-x46x","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"GO-2025-4219"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["0.0.0-20251202123337-6ef83b42c7ce"],"package":"github.com/siyuan-note/siyuan/kernel","purl":null,"source":"GHSA-4r66-7rcv-x46x"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["0.0.0-20251202123337-6ef83b42c7ce"],"package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"GHSA-4r66-7rcv-x46x"}],"products":null,"published":"2025-12-09","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Authenticated attackers can achieve remote code execution by exploiting a Zip Slip vulnerability to overwrite executables and trigger them via Pandoc settings.","url":"https://insights.sbomify.com/GHSA-4r66-7rcv-x46x/"}