/

CVE-2026-100636

Severity:

HIGH RISK

(7.6)

Path Traversal (CWE-22) in SiYuan Export Endpoint

CVE-2026-100636

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write, Stored XSS, and Workspace Defacement

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

A path traversal vulnerability in SiYuan's exportBrowserHTML endpoint allows authenticated administrators to direct exported HTML outside the intended workspace directory. If a crafted folder value reaches the file-writing logic, an attacker may overwrite index.html in a pre-existing kernel-writable location, enabling stored cross-site scripting or workspace defacement.

Affected context

The issue occurs in SiYuan deployments that expose the exportBrowserHTML functionality and accept attacker-influenced folder parameters for export operations. Exploitation depends on the process having write access to a target location outside the intended export directory and on an authenticated administrator account being available.

Exploit preconditions

  • Attack surface: The exportBrowserHTML endpoint
  • Required access: Authentication with administrator-level privileges
  • Trigger point: Processing an export request containing a manipulated folder parameter
  • Filesystem condition: The target location must already exist and be writable by the SiYuan kernel process
  • Why exploitation is possible: Directory traversal sequences are not sufficiently constrained before the resulting path is used to write index.html

Why this happens

The vulnerability results from insufficient canonicalization and boundary enforcement for a user-influenced filesystem path. When traversal components are accepted in the folder parameter, the resolved output path can escape the designated export directory and reach another kernel-writable location. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • An attacker may overwrite an existing index.html file in a writable location.
  • Malicious HTML may enable stored cross-site scripting when subsequently rendered.
  • Workspace content or presentation may be defaced.
  • Application integrity and user trust could be reduced.
  • A compromised writable web-facing location could expose additional users to attacker-controlled content.

General mitigation guidance

Mitigation generally focuses on treating export destinations as controlled filesystem resources rather than trusted user input.

Common defensive patterns include:

  • Resolving and canonicalizing paths before use, then enforcing that the result remains beneath an approved export root.
  • Rejecting traversal components and ambiguous path encodings through centralized validation.
  • Allowing only server-selected export directories or opaque destination identifiers.
  • Applying strict filename and extension policies for generated content.
  • Limiting the kernel process to the minimum filesystem permissions required for normal operation.
  • Separating exported content from privileged, shared, or web-served locations where possible.
  • Applying appropriate browser protections and content policies to reduce the impact of stored HTML injection.

How teams detect issues like this

Organizations can look for path traversal risks through:

  • Static analysis rules identifying filesystem writes that combine request parameters with paths.
  • Code review checks for missing canonicalization, root-boundary validation, and symlink-aware handling.
  • Runtime monitoring for export requests containing traversal markers, encoded separators, or unexpected destination changes.
  • File-integrity monitoring for unauthorized changes to index.html and other sensitive files.
  • Policy enforcement requiring approved directory APIs and centralized path-validation utilities.

Automated security review tools may help identify tainted input flowing into file creation or overwrite operations.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-jf98-m24w-gm9m
vulncheck.comvulncheck.com/advisories/siyuan-before-3.8.4-path-traversal-via-exportbrowserhtml-folder

Frequently asked

questions

It can be exploited through the SiYuan endpoint when the attacker can send authenticated export requests and the deployment permits access to the affected functionality. It is not generally an unauthenticated issue.

The described attack requires an authenticated administrator account. The target filesystem location must also be writable by the SiYuan kernel process.

Constrain export paths to a server-controlled root after canonicalization, reject traversal and ambiguous path forms, and avoid using user-provided values directly in filesystem writes.

Use centralized path-validation utilities, enforce least-privilege filesystem permissions, monitor sensitive file changes, and include traversal-focused tests and static checks in the development pipeline.

Find out what's already
exploitable in your codebase.