CRITICAL🇵🇱 Wersja polska

CVE-2026-54067

CVSS 9.9v3.1pub. 2026-06-24upd. 2026-06-25

SiYuan is an open-source personal knowledge management system. Prior to 3.7.0, CSS snippet body containing </style> breaks out of its surrounding <style> tag when renderSnippet() interpolates it via insertAdjacentHTML. A payload like runs arbitrary JavaScript in the renderer. On Electron desktop builds the renderer runs with nodeIntegration:true, so require('child_process') is reachable from the injected handler and the XSS chains to host RCE. Snippets sync via the workspace repository, so an attacker with write access to any synced workspace plants the payload once and it fires on every device that pulls. The bug also bypasses the user's enabledCSS / enabledJS separation. A user who turned enabledJS off was making a deliberate call not to run untrusted JavaScript; the CSS path runs it anyway. This vulnerability is fixed in 3.7.0.

🤖 AI Analysis
How it works

The renderSnippet() function interpolates CSS snippet content directly into the HTML document using insertAdjacentHTML method, without proper sanitization. Placing a </style> sequence in the snippet content causes premature closure of the <style> tag, allowing injection of arbitrary HTML and JavaScript code. In Electron desktop builds, the renderer has access to Node.js API (nodeIntegration:true), allowing injected code to call require('child_process') and execute system commands. Additionally, the attack bypasses the user's enabledJS setting — JavaScript is executed despite the user consciously disabling this option.

Impact

An attacker with write access to a synchronized workspace can embed a payload once, and it will then be automatically executed on every device synchronizing that workspace — leading to full takeover of the host operating system (RCE), including data theft, modification, and execution of arbitrary processes.

Mitigation & patch

Immediately update SiYuan to version 3.7.0 or later, where the bug has been fixed. Until updating, avoid synchronizing workspaces with untrusted parties and do not import external CSS snippets from unverified sources.

Who is affected

SiYuan versions before 3.7.0, particularly Electron-based desktop builds (Windows, macOS, Linux); the vulnerability affects any user synchronizing a workspace with an untrusted participant

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
Tags
XSS
CWE
References