CVE-2026-32749 in SiYuan
Summary
by MITRE • 03/20/2026
SiYuan is a personal knowledge management system. In versions 3.6.0 and below, POST /api/import/importSY and POST /api/import/importZipMd write uploaded archives to a path derived from the multipart filename field without sanitization, allowing an admin to write files to arbitrary locations outside the temp directory - including system paths that enable RCE. This can lead to aata destruction by overwriting workspace or application files, and for Docker containers running as root (common default), this grants full container compromise. This issue has been fixed in version 3.6.1.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 03/24/2026
The vulnerability identified as CVE-2026-32749 affects SiYuan, a personal knowledge management system, and represents a critical path traversal and arbitrary file write flaw that can lead to remote code execution and complete system compromise. This vulnerability exists in versions 3.6.0 and below, specifically within the import functionality of the application's API endpoints. The flaw manifests in two primary API endpoints: POST /api/import/importSY and POST /api/import/importZipMd, which handle the upload and processing of archive files. These endpoints accept multipart form data containing archive files and process them by writing to disk using paths derived directly from the filename field provided in the multipart request without any sanitization or validation of the path components.
The technical implementation of this vulnerability stems from improper input validation and path handling within the application's file upload processing logic. When users upload archive files through these endpoints, the system constructs file paths by directly incorporating the filename field from the multipart request without sanitizing special characters or path traversal sequences such as "../" or "..\\". This allows an authenticated administrator to manipulate the filename field to specify arbitrary absolute or relative paths outside of the intended temporary directory. The vulnerability is particularly dangerous because it affects administrative users who have elevated privileges, enabling them to write files to critical system locations including configuration files, application binaries, or workspace directories.
The operational impact of this vulnerability extends beyond simple data corruption, as it provides a complete compromise path for attackers who can gain administrative access to the system. When an attacker successfully exploits this vulnerability, they can overwrite critical application files or workspace data, potentially leading to complete application failure or unauthorized data access. In containerized environments where SiYuan runs with root privileges, which is common in Docker deployments, this vulnerability becomes even more severe as it grants full container compromise. The attacker can write malicious payloads to system paths, potentially overwriting binaries or configuration files, leading to persistent backdoors or complete system takeover. This aligns with CWE-22 Path Traversal vulnerabilities, which are categorized under the broader category of insecure direct object references and improper input validation issues.
The security implications of this vulnerability are compounded by the fact that it requires only administrative privileges to exploit, which are often more accessible than regular user accounts in many systems. The attack surface is particularly concerning because it affects the core import functionality that administrators frequently use to migrate or update content. The fix implemented in version 3.6.1 addresses this by introducing proper path sanitization and validation, ensuring that uploaded filenames are processed through a secure method that prevents path traversal attacks and restricts file writes to designated safe directories only. This remediation follows established security best practices for file upload handling and aligns with the ATT&CK framework's techniques for privilege escalation and persistence through file system manipulation. Organizations running affected versions should immediately upgrade to version 3.6.1 or implement compensating controls such as input validation at the network level or application firewalls to prevent exploitation of this vulnerability. The vulnerability demonstrates the critical importance of proper input sanitization and the principle of least privilege in application security design.