Description
SiYuan v3.8.3 fails to HTML-escape the data-subtype attribute when generating gutter-button markup (app/src/protyle/gutter/button.ts, assigned via innerHTML in app/src/protyle/gutter/index.ts) from content pasted as plain-text Markdown containing a Kramdown inline attribute list (IAL). Because the shared Lute renderer parses Kramdown IAL from text/plain input, an attacker-supplied Markdown snippet using entity-encoded quotes in data-subtype breaks out of the attribute value when the gutter markup is re-parsed by the browser, injecting additional attributes such as autofocus and onfocus. If a victim pastes the crafted Markdown and the affected gutter control receives focus, the injected handler executes; in the Electron desktop application, where the main BrowserWindow enables Node integration and disables context isolation, this results in JavaScript execution with renderer Node.js privileges (remote code execution). Fixed in v3.8.4.
Published: 2026-09-26
Score: 8.6 High
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

SiYuan versions prior to 3.8.4 generate gutter-button markup from plain‑text Markdown that is parsed by the Lute renderer. The data-subtype attribute is not HTML‑escaped, allowing an attacker to embed entity‑encoded quotes that break the attribute value. When the markup is re‑parsed by the browser, the injected attributes such as autofocus and onfocus are added, and if the compromised gutter control receives focus the handler executes. In the Electron desktop application this results in JavaScript execution with renderer Node.js privileges, effectively permitting remote code execution on the affected machine.

Affected Systems

SiYuan (siyuan-note:siyuan), versions up to and including 3.8.3 are affected. The fix begins with version 3.8.4.

Risk and Exploitability

The CVSS score of 8.6 indicates a high‑severity vulnerability. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector requires an attacker to supply a crafted Markdown snippet and convince a user to paste it into the application. If the user then interacts with the gutter button, the injected handler runs with full renderer Node.js privileges. The known exploit path is benign for the user to trigger, but the elevated privileges expose the system to complete compromise if the user inadvertently focuses the control.

Generated by OpenCVE AI on September 26, 2026 at 15:11 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SiYuan to version 3.8.4 or later.
  • If an upgrade is not immediately possible, reconfigure the Electron BrowserWindow to disable Node integration or to enable context isolation as a temporary mitigation.
  • Continuously monitor for future updates and ensure that any unsanitized user‑supplied Markdown is treated as plain text or thoroughly escaped before rendering.

Generated by OpenCVE AI on September 26, 2026 at 15:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 26 Sep 2026 13:30:00 +0000

Type Values Removed Values Added
Description SiYuan v3.8.3 fails to HTML-escape the data-subtype attribute when generating gutter-button markup (app/src/protyle/gutter/button.ts, assigned via innerHTML in app/src/protyle/gutter/index.ts) from content pasted as plain-text Markdown containing a Kramdown inline attribute list (IAL). Because the shared Lute renderer parses Kramdown IAL from text/plain input, an attacker-supplied Markdown snippet using entity-encoded quotes in data-subtype breaks out of the attribute value when the gutter markup is re-parsed by the browser, injecting additional attributes such as autofocus and onfocus. If a victim pastes the crafted Markdown and the affected gutter control receives focus, the injected handler executes; in the Electron desktop application, where the main BrowserWindow enables Node integration and disables context isolation, this results in JavaScript execution with renderer Node.js privileges (remote code execution). Fixed in v3.8.4.
Title SiYuan before v3.8.4 Cross-Site Scripting via Kramdown IAL
First Time appeared B3log
B3log siyuan
Weaknesses CWE-79
CPEs cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*
Vendors & Products B3log
B3log siyuan
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-09-26T13:23:12.602Z

Reserved: 2026-09-26T02:32:35.659Z

Link: CVE-2026-100639

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-09-26T14:16:45.633

Modified: 2026-09-26T14:16:45.750

Link: CVE-2026-100639

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-26T15:15:13Z

Weaknesses
  • CWE-79

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