/

CVE-2026-100637

Severity:

HIGH RISK

(7.6)

Path Traversal (CWE-73) in SiYuan checkoutRepo Endpoint

CVE-2026-100637

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-73

Impact:

Arbitrary File Overwrite and Integrity Compromise

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SiYuan versions before 3.8.4 contain a path traversal vulnerability in the checkoutRepo endpoint. An authenticated administrator may use crafted sessionID path data to write or overwrite JSON files in pre-existing kernel-writable directories outside the intended workspace.

Affected context

The issue occurs in SiYuan deployments where the checkoutRepo endpoint processes attacker-controlled sessionID values as filesystem path components. Exploitation depends on authenticated administrative access and the presence of a suitable directory outside the workspace where the SiYuan kernel has write permission.

Exploit preconditions

  • Attack surface: The authenticated checkoutRepo application endpoint
  • Required access: A valid session with administrator-level privileges
  • Trigger point: Processing a sessionID parameter containing directory traversal sequences
  • Filesystem condition: A target directory must already exist and be writable by the SiYuan kernel
  • Why exploitation is possible: Path input is not sufficiently constrained to the intended workspace boundary before JSON file operations occur

Why this happens

The vulnerability results from treating user-controlled path data as a trusted filesystem location. When traversal sequences are accepted without canonicalization and boundary enforcement, a path intended to remain within the workspace can resolve to a location outside it. This behavior maps to CWE-73: External Control of File Name or Path, because an external input influences file operations without adequate restriction to an approved directory.

Potential impact

  • Attackers may overwrite application or configuration JSON files
  • Application data integrity could be compromised
  • SiYuan behavior may be altered through malicious file content
  • Availability could be affected if required files are corrupted
  • Subsequent exploitation may be possible if overwritten files influence privileged processing

General mitigation guidance

Mitigation generally focuses on making workspace file operations independent of user-controlled path traversal.

Common defensive patterns include:

  • Resolve and normalize paths before use, then enforce that they remain beneath an approved workspace directory
  • Reject traversal sequences and absolute-path forms as an additional input validation layer
  • Construct paths from server-controlled identifiers rather than raw request values
  • Restrict write operations to narrowly scoped directories and file types
  • Run the application with the least filesystem privilege required
  • Apply atomic writes, integrity checks, and controlled file permissions for sensitive JSON files
  • Treat authenticated administrative input as untrusted for filesystem operations

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying request parameters used in filesystem path construction
  • Code review checks for missing canonicalization and workspace-boundary validation
  • Tests using traversal markers, encoded separators, absolute paths, and mixed path formats
  • Runtime monitoring for writes outside approved application directories
  • File-integrity monitoring on sensitive JSON and configuration locations
  • Policy enforcement that blocks application processes from writing outside designated data paths

Automated security review tools may help identify path construction flows that lack explicit boundary checks.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-jhmh-hr4g-c5g2
vulncheck.comvulncheck.com/advisories/siyuan-before-3.8.4-path-traversal-via-checkoutrepo-sessionid

Frequently asked

questions

It may be exploitable through the SiYuan endpoint over the network, but exploitation requires authenticated administrator-level access and suitable writable filesystem locations.

The vulnerability targets JSON files in pre-existing directories that are writable by the SiYuan kernel and can be reached through the manipulated path.

Keep all user-influenced paths within a canonical, server-controlled workspace boundary and reject any path that resolves outside it.

Treat all path components from requests as untrusted, use allowlisted identifiers, test traversal variants, and enforce least-privilege filesystem permissions.

Find out what's already
exploitable in your codebase.