CVE-2026-100638 Overview
CVE-2026-100638 is a path traversal vulnerability in SiYuan, an open-source personal knowledge management application. Versions prior to v3.8.4 fail to sanitize the notebook parameter in the setNotebookIcon API endpoint. Authenticated administrators can supply directory traversal sequences to escape the workspace data directory and write conf.json files to arbitrary locations writable by the kernel process. The flaw is classified under CWE-73: External Control of File Name or Path.
Critical Impact
Authenticated attackers can create arbitrary directory trees and write files outside the workspace boundary, enabling integrity compromise of the host filesystem and potential follow-on code execution depending on the write target.
Affected Products
- SiYuan versions before v3.8.4
- SiYuan kernel component exposing the setNotebookIcon endpoint
- Deployments where the SiYuan kernel process has write access to sensitive host paths
Discovery Timeline
- 2026-09-26 - CVE-2026-100638 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-100638
Vulnerability Analysis
The vulnerability exists in the setNotebookIcon API endpoint within the SiYuan kernel. The handler accepts a notebook identifier from the client and uses that value to construct a filesystem path where notebook configuration data is written. The handler does not canonicalize the resulting path or validate that it remains within the workspace data directory.
An authenticated administrator can submit a notebook value containing ../ traversal sequences. The kernel joins the attacker-controlled value with the workspace root and writes a conf.json file at the resolved location. If intermediate directories do not exist, the kernel creates them, giving the attacker a primitive to seed arbitrary directory trees on the host.
Because the write primitive produces a JSON file at an attacker-chosen path, impact extends beyond simple data tampering. Attackers can overwrite configuration files consumed by other services, plant files in autoloaded directories, or disrupt system components the kernel user can modify.
Root Cause
The root cause is missing path validation on the notebook parameter before it is concatenated with the workspace base directory. The endpoint trusts the caller-supplied identifier as a safe directory name and performs no normalization, no allow-list check against known notebook IDs, and no containment check confirming the final path resolves inside the workspace boundary.
Attack Vector
Exploitation requires network access to the SiYuan kernel API and valid administrator credentials. The attacker issues a crafted request to the setNotebookIcon endpoint with a notebook field containing traversal sequences such as ../../../tmp/attacker-controlled. The kernel resolves the path relative to the workspace, creates missing directories along the way, and writes the conf.json payload at the escaped location. See the GitHub Security Advisory GHSA-6h8x-6mph-7438 and the VulnCheck Advisory for additional technical detail.
Detection Methods for CVE-2026-100638
Indicators of Compromise
- Unexpected conf.json files appearing outside the SiYuan workspace data/ directory
- New directory trees created under paths writable by the SiYuan kernel user but unrelated to normal notebook storage
- HTTP requests to /api/notebook/setNotebookIcon where the notebook field contains .., /, \, or URL-encoded traversal sequences
Detection Strategies
- Inspect kernel access logs for setNotebookIcon calls with notebook identifiers that do not match the expected 20-character SiYuan ID format
- Alert on filesystem write events from the SiYuan process targeting directories outside the configured workspace root
- Correlate administrator authentication events with anomalous API payload patterns targeting notebook configuration endpoints
Monitoring Recommendations
- Enable file integrity monitoring on directories adjacent to the SiYuan workspace and on common post-exploitation targets writable by the kernel user
- Capture full request bodies for authenticated API calls to the SiYuan kernel to retain forensic evidence of traversal payloads
- Monitor process behavior for the SiYuan kernel creating files in paths outside its documented data directories
How to Mitigate CVE-2026-100638
Immediate Actions Required
- Upgrade SiYuan to version v3.8.4 or later on all deployments
- Rotate administrator credentials for any kernel instance exposed to untrusted networks
- Audit the filesystem for stray conf.json files or unexpected directories created by the SiYuan kernel user
Patch Information
The upstream fix is included in SiYuan v3.8.4. The patched release adds validation on the notebook parameter to prevent traversal sequences from escaping the workspace boundary. Review the GitHub Security Advisory GHSA-6h8x-6mph-7438 for the vendor's remediation notes.
Workarounds
- Restrict network access to the SiYuan kernel API so only trusted clients can reach the setNotebookIcon endpoint
- Run the SiYuan kernel under a dedicated low-privilege user whose write access is confined to the workspace directory
- Enforce strong, unique administrator credentials and require authenticated reverse-proxy access in front of the kernel
# Example: constrain the SiYuan kernel to its workspace using a dedicated user
# and tight directory permissions
sudo useradd --system --home /var/lib/siyuan --shell /usr/sbin/nologin siyuan
sudo chown -R siyuan:siyuan /var/lib/siyuan
sudo chmod 750 /var/lib/siyuan
# Restrict kernel API exposure to localhost; front with an authenticated reverse proxy
sudo -u siyuan /opt/siyuan/kernel --workspace /var/lib/siyuan --bind 127.0.0.1:6806
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

