CVE-2026-34585

SiYuan: Stored XSS in imported .sy.zip content leads to arbitrary command execution

Published Mar 31, 2026 CVSS 3.1 · 8.6 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
First Time appeared B3log
B3log siyuan
CPEs cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*
Vendors & Products B3log
B3log siyuan
Type Values Removed Values Added
First Time appeared Siyuan
Siyuan siyuan
Vendors & Products Siyuan
Siyuan siyuan
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 1, 2026, 1:34 PM
Reserved
Mar 30, 2026, 4:56 PM
Status
Analyzed
Published
Mar 31, 2026, 10:16 PM
Modified
Jun 17, 2026, 10:39 AM