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

Not scored Published

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

  1. Authenticate
  2. 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"
  1. Upload zip to workspace via /api/file/putFile
  2. Extract zip via /api/archive/unzip, overwrites the existing executable startup.sh while maintaining the +x permission
  3. 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

Which versions are affected by GHSA-4r66-7rcv-x46x?

3 open source packages ship an affected version, including github.com/siyuan-note/siyuan/kernel.

PackageAffectedFixed in
github.com/siyuan-note/siyuan/kernel GoAll versionsNone
github.com/siyuan-note/siyuan/kernel GoAll versions to 0.0.0-20251202123337-6ef83b42c7ceNone
github.com/siyuan-note/siyuan/kernel GoAll versions to 0.0.0-20251202123337-6ef83b42c7ceNone

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.

Is GHSA-4r66-7rcv-x46x in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free