SiYuan Vulnerable to Remote Code Execution via Stored XSS in Notebook Name - Mobile Interface
Description
SiYuan is a personal knowledge management system. In versions 3.6.0 and below, the mobile file tree (MobileFiles.ts) renders notebook names via innerHTML without HTML escaping when processing renamenotebook WebSocket events. The desktop version (Files.ts) properly uses escapeHtml() for the same operation. An authenticated user who can rename notebooks can inject arbitrary HTML/JavaScript that executes on any mobile client viewing the file tree. Since Electron is configured with nodeIntegration: true and contextIsolation: false, the injected JavaScript has full Node.js access, escalating stored XSS to full remote code execution. The mobile layout is also used in the Electron desktop app when the window is narrow, making this exploitable on desktop as well. This issue has been fixed in version 3.6.1.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/siyuan-note/siyuan/kernelGo | <= 0.0.0-20260313024916-fd6526133bb3 | — |
Affected products
1- Range: < 3.6.1
Patches
1f6d35103f774:lock: https://github.com/siyuan-note/siyuan/security/advisories/GHSA-qr46-rcv3-4hq3
1 file changed · +1 −1
app/src/mobile/dock/MobileFiles.ts+1 −1 modified@@ -79,7 +79,7 @@ export class MobileFiles extends Model { this.selectItem(data.data.box.id, data.data.path); break; case "renamenotebook": - this.element.querySelector(`[data-url="${data.data.box}"] .b3-list-item__text`).innerHTML = data.data.name; + this.element.querySelector(`[data-url="${data.data.box}"] .b3-list-item__text`).innerHTML = escapeHtml(data.data.name); break; case "rename": this.onRename(data.data);
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-qr46-rcv3-4hq3ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-32751ghsaADVISORY
- github.com/siyuan-note/siyuan/commit/f6d35103f774b65e52f03e018649ff0e57924fb0ghsax_refsource_MISCWEB
- github.com/siyuan-note/siyuan/releases/tag/v3.6.1ghsax_refsource_MISCWEB
- github.com/siyuan-note/siyuan/security/advisories/GHSA-qr46-rcv3-4hq3ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.