GHSA-GW25-M53R-QH88

GHSA-GW25-M53R-QH88 is a medium-severity path traversal vulnerability in github.com/siyuan-note/siyuan/kernel (go), affecting versions < 0.0.0-20260510110132-b763d787d1f2. It is fixed in 0.0.0-20260510110132-b763d787d1f2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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.

Affected

  • From commit bb481e1 (the hardening) through the latest master.
  • Requires SiYuan access authorization (model.CheckAuth) - but the patch's stated goal is to deny sensitive-file
    export even to authorized callers.

Root cause

kernel/server/serve.go serveExport(): the main branch has IsSubPath + IsSensitivePath; the
/export/temp/ short-circuit branch (above it) has neither and uses util.TempDir as its root.
c.Request.URL.Path is percent-decoded by net/http, so %2e%2e becomes .. and filepath.Join collapses it.

Incomplete-fix lineage

  • Export disclosure (issue #12213; CVE-2026-30869) -> fix bb481e1 / d68bd5a (GHSA-6865-qjcf-286f): guards on
    the main branch + IsSensitivePath extended to *.db/*.log.
  • Follow-up CVE-2026-41894 (GHSA-hjh7-r5w8-5872) in the same /export path family.
  • The /export/temp/ short-circuit branch was never covered by the guards (this report).

Proof of concept (benign)

  1. Authenticate (access auth code).
  2. GET /export/<sensitive> (main branch) -> 401/403 (guards work).
  3. GET /export/temp/%2e%2e/%2e%2e/.../tmp/<planted-marker> (or /etc/hostname) -> 200 + file content,
    demonstrating the unguarded traversal. The PoC reads only a planted marker / /etc/hostname; no credentials.

References

Impact

Authenticated arbitrary file read bypassing the sensitive-file protection: /etc/passwd, ~/.ssh/*, SiYuan
*.db workspace data, *.log.

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

GHSA-GW25-M53R-QH88 has a CVSS score of 6.5 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260510110132-b763d787d1f2); upgrading removes the vulnerable code path.

Affected versions

github.com/siyuan-note/siyuan/kernel (< 0.0.0-20260510110132-b763d787d1f2)

Security releases

github.com/siyuan-note/siyuan/kernel → 0.0.0-20260510110132-b763d787d1f2 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

  • Apply IsSubPath + IsSensitivePath to the /export/temp/ branch (or restrict its root to TempDir/temp with
    an IsSubPath check).
  • filepath.Clean the request path and reject ...
  • Merge both branches into one guarded file-serving function.

Frequently Asked Questions

  1. What is GHSA-GW25-M53R-QH88? GHSA-GW25-M53R-QH88 is a medium-severity path traversal vulnerability in github.com/siyuan-note/siyuan/kernel (go), affecting versions < 0.0.0-20260510110132-b763d787d1f2. It is fixed in 0.0.0-20260510110132-b763d787d1f2. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. How severe is GHSA-GW25-M53R-QH88? GHSA-GW25-M53R-QH88 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/siyuan-note/siyuan/kernel are affected by GHSA-GW25-M53R-QH88? github.com/siyuan-note/siyuan/kernel (go) versions < 0.0.0-20260510110132-b763d787d1f2 is affected.
  4. Is there a fix for GHSA-GW25-M53R-QH88? Yes. GHSA-GW25-M53R-QH88 is fixed in 0.0.0-20260510110132-b763d787d1f2. Upgrade to this version or later.
  5. Is GHSA-GW25-M53R-QH88 exploitable, and should I be worried? Whether GHSA-GW25-M53R-QH88 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-GW25-M53R-QH88 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-GW25-M53R-QH88? Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260510110132-b763d787d1f2 or later.

Stop the waste.
Protect your environment with Kodem.