CVE-2026-100639

SiYuan before v3.8.4 Cross-Site Scripting via Kramdown IAL

Published Sep 26, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

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

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
Metrics ssvc

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

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

Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Sep 28, 2026, 6:51 PM
Reserved
Sep 26, 2026, 2:32 AM
Status
Deferred
Published
Sep 26, 2026, 2:16 PM
Modified
Sep 28, 2026, 7:16 PM