# GHSA-4r66-7rcv-x46x: SiYuan vulnerable to RCE via zip slip and Command Injection via PandocBin

- Severity: High (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-12-09T17:18:16.000Z
- Modified: 2026-03-03T04:57:48.451Z
- Also known as: GO-2025-4219
- Weaknesses: CWE-22

## Description

### Summary
Siyuan 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.

### Steps to reproduce
1. Authenticate
2. Create zip slip payload with path traversal entry `../../../../opt/siyuan/startup.sh`. startup.sh contains malicious code like:
```bash
#!/bin/sh
echo 'you have been pwned' > /siyuan/workspace/data/pwned.txt
echo "pandoc 3.1.0"
```
3. Upload zip to workspace via `/api/file/putFile`
4. Extract zip via `/api/archive/unzip`, overwrites the existing executable `startup.sh` while maintaining the +x permission
5. 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

(As written by GitHub Advisory Database.)

## Affected

- github.com/siyuan-note/siyuan/kernel (Go): up to 0.0.0-20251202123337-6ef83b42c7ce; all versions

## References

- <https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4r66-7rcv-x46x> (advisory, web)
- <https://github.com/siyuan-note/siyuan> (package)

## Sources

- GitHub Advisory Database: [GHSA-4r66-7rcv-x46x](https://github.com/advisories/GHSA-4r66-7rcv-x46x), CC-BY-4.0, modified 2025-12-15
- Go Vulnerability Database: [GO-2025-4219](https://pkg.go.dev/vuln/GO-2025-4219), CC-BY-4.0, modified 2026-03-03

---

Page: https://cve.day/GHSA-4r66-7rcv-x46x · Whole record: https://cve.day/GHSA-4r66-7rcv-x46x.json · Rebuilt by cve.day 2026-11-25T22:56:24.254Z
