CVE-2026-56397
Received Received - Intake
SiYuan Bazaar XSS via Unsanitized Package Metadata

Publication date: 2026-06-21

Last updated on: 2026-06-21

Assigner: VulnCheck

Description
SiYuan before v3.6.1 fails to sanitize package metadata and README content in the Bazaar marketplace, allowing malicious package authors to inject arbitrary HTML and JavaScript. Attackers can achieve remote code execution on any user browsing the Bazaar by embedding XSS payloads in package displayName, description, or README fields, exploiting Electron's nodeIntegration setting to execute OS commands.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-21
Last Modified
2026-06-21
Generated
2026-06-21
AI Q&A
2026-06-21
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
siyuan siyuan to 3.6.1 (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.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability affects SiYuan versions before 3.6.1 and involves improper sanitization of package metadata and README content in the Bazaar marketplace.

Malicious package authors can inject arbitrary HTML and JavaScript code by embedding cross-site scripting (XSS) payloads in fields such as package displayName, description, or README.

Because SiYuan uses Electron with nodeIntegration enabled, attackers can exploit this XSS to execute remote code on the operating system of any user browsing the Bazaar marketplace.

Impact Analysis

This vulnerability can lead to remote code execution on your system if you browse the Bazaar marketplace using a vulnerable version of SiYuan.

Attackers can run arbitrary OS commands, potentially leading to full system compromise, data theft, or installation of malware.

Since the attack requires only browsing a malicious package, it poses a high risk even without user privileges or prior authentication.

Compliance Impact

This vulnerability allows attackers to execute arbitrary code remotely on users' systems by exploiting cross-site scripting (XSS) in the SiYuan Bazaar marketplace. Such unauthorized code execution can lead to theft of sensitive data including API tokens, session cookies, and SSH keys.

The exposure and potential compromise of sensitive user data due to this vulnerability could result in non-compliance with data protection regulations such as GDPR and HIPAA, which mandate the protection of personal and sensitive information against unauthorized access or breaches.

Organizations using affected versions of SiYuan may face increased risk of data breaches and associated regulatory penalties if this vulnerability is exploited and not remediated.

Detection Guidance

Detection of this vulnerability involves identifying if your SiYuan installation is running a vulnerable version (3.5.9 or earlier) and if the Bazaar marketplace is rendering package metadata or README files without proper sanitization.

Since the vulnerability is triggered by malicious JavaScript embedded in package metadata or README content, monitoring network traffic for suspicious JavaScript payloads or unexpected HTML content in Bazaar responses can help detect exploitation attempts.

You can check the installed SiYuan version with commands like:

  • On Linux/macOS: `siyuan --version` or check the application about page.
  • On Windows: Check the version in the application UI or via installed programs list.

To detect malicious payloads in Bazaar package metadata or README files, you can inspect the Bazaar marketplace data files or network traffic for suspicious HTML or JavaScript tags, for example using:

  • Use `grep` or similar tools to search for suspicious script tags in Bazaar data files: `grep -r '<script' path_to_bazaar_data`
  • Monitor network traffic with tools like `tcpdump` or `Wireshark` filtering for Bazaar marketplace requests and responses containing suspicious HTML or JavaScript.

However, no specific detection commands are provided in the available resources.

Mitigation Strategies

Immediate mitigation steps include upgrading SiYuan to version 3.6.1 or later, where the vulnerability has been patched.

Additional recommended mitigations are:

  • Ensure all user-controlled metadata in the Bazaar marketplace is properly escaped to prevent injection.
  • Enable sanitization for README rendering by calling SetSanitize(true) in the Markdown parser.
  • Harden the Electron configuration by disabling nodeIntegration, enabling contextIsolation, and enabling sandboxing to reduce the risk of remote code execution.

Until the patch is applied, avoid browsing the Bazaar marketplace or viewing package READMEs from untrusted sources to reduce exposure.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-56397. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart