Описание
SiYuan: ZipSlip -> Arbitrary File Overwrite -> RCE
Summary
Function importZipMd is vulnerable to ZipSlip which allows an authenticated user to overwrite files on the system.
Details
An authenticated user with access to the import functionality in notes is able to overwrite any file on the system, the vulnerable function is importZipMd, this can escalate to full code execution under some circumstances, for example using the official docker image it is possible to overwrite entrypoint.sh and after a container restart it will execute the changed code causing remote code execution.
PoC
Code used to generate the ZipSlip:
Impact
The exploit is possible only if the attacker has access to import functionality. It's possible to achieve code execution and some persistence within the container
Пакеты
github.com/siyuan-note/siyuan/kernel
<= 0.0.0-20251202123337-6ef83b42c7ce
Отсутствует
Связанные уязвимости
SiYuan is self-hosted, open source personal knowledge management software. Versions 0.0.0-20251202123337-6ef83b42c7ce and below contain function importZipMd which is vulnerable to ZipSlips, allowing an authenticated user to overwrite files on the system. An authenticated user with access to the import functionality in notes is able to overwrite any file on the system, and can escalate to full code execution under some circumstances. A fix is planned for version 3.5.0.