Description
SiYuan is a personal knowledge management system. Prior to version 3.6.2, a vulnerability allows crafted block attribute values to bypass server-side attribute escaping when an HTML entity is mixed with raw special characters. An attacker can embed a malicious IAL value inside a .sy document, package it as a .sy.zip, and have the victim import it through the normal Import -> SiYuan .sy.zip workflow. Once the note is opened, the malicious attribute breaks out of its original HTML context and injects an event handler, resulting in stored XSS. In the Electron desktop client, this XSS reaches remote code execution because injected JavaScript runs with access to Node/Electron APIs. This issue has been patched in version 3.6.2.
Published: 2026-03-31
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution via stored XSS
Action: Immediate Patch
AI Analysis

Impact

SiYuan is a personal knowledge management system that stores documents in .sy format. Prior to release 3.6.2, an attacker can craft a block attribute value that contains a mixed HTML entity and raw special characters. When a victim imports a .sy.zip containing this malicious attribute, the value bypasses server‑side escaping, breaks out of its original HTML context and injects an event handler. On the Electron desktop client the injected JavaScript runs with full Node/Electron privileges, allowing the attacker to execute arbitrary system commands. The weakness corresponds to Unvalidated Input and Stored Cross‑Site Scripting (CWE‑79) and code injection (CWE‑94).

Affected Systems

The vulnerability affects the Siyuan note application, version 3.6.1 and earlier, on all operating systems where the Electron desktop client runs. It is relevant to users who use the Import → SiYuan .sy.zip workflow to bring external notes into their account. The issue does not affect the web or mobile versions, only the desktop Electron build.

Risk and Exploitability

The Common Vulnerability Scoring System assigns a score of 8.6, indicating high severity, and the Exploit Prediction Scoring System shows a probability of less than 1 %, meaning a real exploitation attack is unlikely to be seen. Because the attack relies on a victim importing a specifically crafted note file, it is primarily a user‑interaction attack; a malicious file can be phished or delivered via social engineering to trick the victim into opening it. The vulnerability is not listed in CISA’s Known Exploited Vulnerabilities catalog, further suggesting no publicly available exploit. Nonetheless, users of the affected Electron client should treat this as a critical patch.

Generated by OpenCVE AI on April 3, 2026 at 20:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Siyuan to version 3.6.2 or later to apply the fix that validates and sanitizes block attribute values.
  • If an upgrade is not immediately possible, avoid importing .sy.zip files from untrusted sources or delete any .sy.zip files from the user’s documents folder.
  • As a temporary mitigation, consider disabling Node integration in the Electron client or use a sandboxed version of the application if available, though this is not officially supported.
  • Verify that the patch has been applied by checking the application version number after restarting the client.

Generated by OpenCVE AI on April 3, 2026 at 20:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-ff66-236v-p4fg SiYuan Desktop: Stored XSS in imported .sy.zip content leads to arbitrary command execution
History

Fri, 03 Apr 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared B3log
B3log siyuan
CPEs cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*
Vendors & Products B3log
B3log siyuan

Fri, 03 Apr 2026 10:15:00 +0000

Type Values Removed Values Added
First Time appeared Siyuan
Siyuan siyuan
Vendors & Products Siyuan
Siyuan siyuan

Wed, 01 Apr 2026 23:45:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 01 Apr 2026 02:15:00 +0000

Type Values Removed Values Added
Description SiYuan is a personal knowledge management system. Prior to version 3.6.2, a vulnerability allows crafted block attribute values to bypass server-side attribute escaping when an HTML entity is mixed with raw special characters. An attacker can embed a malicious IAL value inside a .sy document, package it as a .sy.zip, and have the victim import it through the normal Import -> SiYuan .sy.zip workflow. Once the note is opened, the malicious attribute breaks out of its original HTML context and injects an event handler, resulting in stored XSS. In the Electron desktop client, this XSS reaches remote code execution because injected JavaScript runs with access to Node/Electron APIs. This issue has been patched in version 3.6.2.
Title SiYuan: Stored XSS in imported .sy.zip content leads to arbitrary command execution
Weaknesses CWE-79
CWE-94
References
Metrics cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-01T13:34:23.291Z

Reserved: 2026-03-30T16:56:30.999Z

Link: CVE-2026-34585

cve-icon Vulnrichment

Updated: 2026-04-01T13:34:11.964Z

cve-icon NVD

Status : Analyzed

Published: 2026-03-31T22:16:22.080

Modified: 2026-04-03T16:52:22.293

Link: CVE-2026-34585

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-03T21:17:24Z

Weaknesses