Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/siyuan-note/siyuan/kernel
  4. ›
  5. GHSA-gw25-m53r-qh88

GHSA-gw25-m53r-qh88: SiYuan: path traversal via /export/temp/ short-circuit branch (incomplete fix for the export-disclosure hardening, GHSA-6865-qjcf-286f)

September 3, 2026

SiYuan’s /export/ file handler was hardened against export disclosure (issue #12213) by adding an IsSubPath(exportBaseDir, fullPath) check and an IsSensitivePath() check in commit bb481e1. These guards were added only to the main branch of the handler. The handler begins with a short-circuit branch:

if strings.HasPrefix(c.Request.URL.Path, "/export/temp/") {
c.File(filepath.Join(util.TempDir, c.Request.URL.Path))
return
}

This branch joins the broader util.TempDir with the raw, percent-decoded request path and serves it with neither IsSubPath nor IsSensitivePath. An authenticated request to /export/temp/%2e%2e/.../etc/passwd traverses out of TempDir and reads arbitrary files - exactly the sensitive-file disclosure the patch intended to prevent. Present in the latest master.

References

  • github.com/advisories/GHSA-gw25-m53r-qh88
  • github.com/siyuan-note/siyuan/commit/b763d787d1f2b862c577049e4ee147c5857fe413
  • github.com/siyuan-note/siyuan/security/advisories/GHSA-gw25-m53r-qh88

Code Behaviors & Features

Detect and mitigate GHSA-gw25-m53r-qh88 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.0.0-20260510110132-b763d787d1f2

Fixed versions

  • 0.0.0-20260510110132-b763d787d1f2

Solution

Upgrade to version 0.0.0-20260510110132-b763d787d1f2 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

go/github.com/siyuan-note/siyuan/kernel/GHSA-gw25-m53r-qh88.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:41 +0000.