github.com/siyuan-note/siyuan/kernel
Affected
- introduced
0, last affected0.0.0-20251202123337-6ef83b42c7ce(semver)
Fixed versions
None listed
Fix
No fixed version is listed.
Advisory
Also known as: GO-2025-4219
SiYuan vulnerable to RCE via zip slip and Command Injection via PandocBin
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
../../../../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"
/api/file/putFile/api/archive/unzip, overwrites the existing executable startup.sh while maintaining the +x permission/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 codeHigh Basis: The source's own band: HIGH
0, last affected 0.0.0-20251202123337-6ef83b42c7ce (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0