CVE-2026-39846
Received Received - Intake
Stored XSS in SiYuan Desktop Client Enables Remote Code Execution

Publication date: 2026-04-07

Last updated on: 2026-04-16

Assigner: GitHub, Inc.

Description
SiYuan is a personal knowledge management system. Prior to 3.6.4, a malicious note synced to another user can trigger remote code execution in the SiYuan Electron desktop client. The root cause is that table caption content is stored without safe escaping and later unescaped into rendered HTML, creating a stored XSS sink. Because the desktop renderer runs with nodeIntegration enabled and contextIsolation disabled, attacker-controlled JavaScript executes with access to Node.js APIs. In practice, an attacker can import a crafted note into a synced workspace, wait for the victim to sync, and achieve code execution when the victim opens the note. This vulnerability is fixed in 3.6.4.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-07
Last Modified
2026-04-16
Generated
2026-05-07
AI Q&A
2026-04-08
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
b3log siyuan to 3.6.4 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the SiYuan personal knowledge management system prior to version 3.6.4. It allows a malicious note synced to another user to trigger remote code execution in the SiYuan Electron desktop client. The root cause is that table caption content is stored without safe escaping and later unescaped into rendered HTML, creating a stored cross-site scripting (XSS) vulnerability. Because the desktop renderer runs with nodeIntegration enabled and contextIsolation disabled, attacker-controlled JavaScript can execute with access to Node.js APIs. An attacker can import a crafted note into a synced workspace, wait for the victim to sync, and achieve code execution when the victim opens the note.


How can this vulnerability impact me? :

This vulnerability can have severe impacts because it allows remote code execution on the victim's machine. An attacker who successfully exploits this can run arbitrary code with the privileges of the SiYuan desktop client user. This can lead to full system compromise, data theft, installation of malware, or other malicious activities.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, you should upgrade the SiYuan Electron desktop client to version 3.6.4 or later, where the issue has been fixed.

Avoid importing or syncing notes from untrusted sources until the update is applied.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

This vulnerability allows remote code execution through malicious notes synced across users, potentially leading to unauthorized access and control over a victim's machine.

Such unauthorized access and execution of arbitrary code could result in breaches of confidentiality, integrity, and availability of data handled by the SiYuan Electron desktop client.

Consequently, organizations using affected versions of SiYuan may face challenges in maintaining compliance with data protection regulations like GDPR and HIPAA, which require safeguarding personal and sensitive information against unauthorized access and ensuring system security.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by monitoring for the presence of maliciously crafted notes (.sy.zip files) containing table captions with embedded HTML or JavaScript payloads that exploit the stored XSS vulnerability in the SiYuan Electron desktop client.

Since the attack vector involves syncing and opening a malicious note, detection can focus on identifying suspicious .sy.zip files or unusual table caption content in synced notes.

Suggested commands or approaches include:

  • Inspect synced note files (.sy.zip) for suspicious HTML or JavaScript payloads in table captions, for example by extracting and searching for <img> tags with onerror attributes or other script tags.
  • Use command-line tools like grep or strings to search for suspicious patterns in note files, e.g.:
  • grep -r --include="*.sy.zip" -iE '<img|onerror|<script' /path/to/synced/notes
  • Monitor the SiYuan application logs or sync logs for unusual note imports or sync events involving new or modified notes.
  • Check for unexpected child processes spawned by the SiYuan client, which may indicate exploitation, e.g., on Windows using:
  • Get-Process -Name siyuan or use Process Monitor tools to detect unexpected executions.

Note that detection is challenging because the payload executes when the victim opens the note, so proactive scanning of note contents and monitoring for suspicious activity is recommended.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart