GHSA-4r66-7rcv-x46x SiYuan vulnerable to RCE via zip slip and Command Injection via PandocBin
Authenticated attackers can achieve remote code execution by exploiting a Zip Slip vulnerability to overwrite executables and trigger them via Pandoc settings.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is GHSA-4r66-7rcv-x46x?
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.
Official 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
- Authenticate
- Create zip slip payload with path traversal entry
../../../../opt/siyuan/startup.sh. startup.sh contains malicious code like:
#!/bin/sh
echo 'you have been pwned' > /siyuan/workspace/data/pwned.txt
echo "pandoc 3.1.0"
- Upload zip to workspace via
/api/file/putFile - Extract zip via
/api/archive/unzip, overwrites the existing executablestartup.shwhile maintaining the +x permission - Trigger execution by calling
/api/setting/setExportwithpandocBin=/opt/siyuan/startup.sh. This callsIsValidPandocBin()which executesstartup.sh --versionthat outputs "pandoc 3.1.0" and executes any arbitrary malicious code
Which versions are affected by GHSA-4r66-7rcv-x46x?
3 open source packages ship an affected version, including github.com/siyuan-note/siyuan/kernel.
| Package | Affected | Fixed in |
|---|---|---|
github.com/siyuan-note/siyuan/kernel Go | All versions | None |
github.com/siyuan-note/siyuan/kernel Go | All versions to 0.0.0-20251202123337-6ef83b42c7ce | None |
github.com/siyuan-note/siyuan/kernel Go | All versions to 0.0.0-20251202123337-6ef83b42c7ce | None |
How do I fix GHSA-4r66-7rcv-x46x?
No fix has been published for GHSA-4r66-7rcv-x46x yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is GHSA-4r66-7rcv-x46x being exploited?
There is no known exploitation of GHSA-4r66-7rcv-x46x in the wild and no public exploit code.
Sources
Also known as GO-2025-4219.