The vulnerability is a classic two-stage RCE. First, an attacker uses a Zip Slip vulnerability in the unzip function to upload a malicious script to a known location on the server. The unzip function fails to sanitize the file paths within the zip archive, allowing the attacker to write outside of the intended destination directory.
Second, the attacker triggers the execution of the uploaded script by exploiting a command injection vulnerability in the IsValidPandocBin function. This function is called by the setExport API endpoint. The IsValidPandocBin function executes the provided binary path with --version to validate it. By setting the pandocBin path to their uploaded script, the attacker can get it to execute.
The combination of these two vulnerabilities allows a remote, authenticated attacker to achieve remote code execution on the SiYuan server.