Siyuan
CVE-2026-40922
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker compromises bazaar package
-
DeliveryInjects iframe srcdoc with embedded script
-
ExploitUploads malicious README to package
-
InstallUser views package in marketplace
-
C2Lute sanitizer fails to block iframe
-
Executesrcdoc payload executes in Electron context
-
ImpactArbitrary code execution with full app privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires: (1) SiYuan versions 3.6.1-3.6.3 running on the user's machine, (2) the bazaar marketplace feature enabled (default in standard installations), (3) the user actively browsing or viewing a malicious bazaar package in the marketplace UI, and (4) the attacker having the ability to publish or modify a bazaar package (either via compromised repository credentials or by creating a new malicious package repository linked to the bazaar). Users with the marketplace feature disabled or who do not browse bazaar packages are not at risk. The vulnerability does not require user interaction beyond viewing the package (no clicking, hovering, or accepting prompts), and exploitation is not restricted to specific SiYuan deployment modes (desktop, portable, or containerized installations are all vulnerable if marketplace is enabled). |
| Impact | CVSS 5.3 (PR:L/UI:N) indicates low to moderate severity, but the vulnerability carries significantly higher real-world risk. Authentication (PR:L) is required - an attacker must first become a bazaar package author or compromise an existing author's repository - this raises the barrier substantially above random remote exploitation. However, once a malicious package is published, it executes with full application privileges in Electron (arbitrary code execution in client context), not merely data exfiltration. The CVSS vector shows limited scope (S:X not specified as S:C), which may understate impact; a confirmed RCE tag and references to arbitrary code execution suggest the actual impact is higher. UI:N (no user interaction beyond viewing the marketplace) is correct: users need only browse the SiYuan marketplace to trigger execution, a normal workflow. Exploitation requires a non-default configuration (bazaar marketplace enabled and accessible), but this is the intended use case for many users. The incomplete prior fix (CVE-2026-33066) and rapid patch deployment (v3.6.4) suggest the vendor recognizes higher-than-CVSS risk. Real-world priority: HIGH for users who actively use the bazaar marketplace; LOW for isolated or air-gapped deployments. No KEV listing or public POC identified, suggesting targeted rather than mass-exploitation risk. |
| Exploit ScenarioDerived | An attacker creates or compromises a bazaar package repository and uploads a modified README.md containing an iframe with embedded JavaScript in a srcdoc attribute. When a SiYuan user browses the marketplace and views the package details, the README renders in the marketplace UI. The unsanitized iframe executes, and the embedded script runs with full Electron privileges, allowing the attacker to exfiltrate credentials from the user's vault, modify documents, or install persistence mechanisms. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 17, 2026
SiYuan 3.6.1 through 3.6.3 allows arbitrary code execution when users view malicious bazaar packages in the marketplace UI. The vulnerability stems from an incomplete XSS fix (for CVE-2026-33066) that enabled an HTML sanitizer but failed to block iframe tags with srcdoc attributes containing embedded scripts. A malicious package author can inject JavaScript that executes in the Electron process with full application privileges, compromising the user's machine. The issue is confirmed fixed in version 3.6.4 and no public exploitation has been reported at time of analysis.
RemediationAI
Upgrade immediately to SiYuan version 3.6.4 or later, which includes the corrected HTML sanitizer that now blocks iframe tags or properly sanitizes srcdoc attributes. Users unable to upgrade immediately should disable the bazaar marketplace feature if non-essential: within SiYuan settings, navigate to 'Bazaar' and disable marketplace access until an upgrade is available. Alternatively, restrict network access to the bazaar repository domain (api.github.com, etc.) at the firewall level to prevent marketplace package retrieval, though this blocks all bazaar functionality including community plugins and themes. The vendor's GitHub security advisory (https://github.com/siyuan-note/siyuan/security/advisories/GHSA-8q5w-mmxf-48jg) provides confirmation and deployment guidance.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SiYuan uses the Lute HTML sanitizer to prevent XSS in bazaar README rendering. Lute implements a URL-prefix blocklist mechanism intended to filter dangerous URLs (e.g., javascript:, data:), but this approach assumes all dangerous content flows through URL attributes. The srcdoc attribute of iframe elements is different: it directly embeds raw HTML content rather than a URL reference, bypassing the URL-prefix filter entirely. An attacker can craft an iframe with a srcdoc attribute containing inline JavaScript (e.g., <iframe srcdoc='<script>alert(1)</script>'>) that executes when the iframe is rendered. Because SiYuan's marketplace UI renders README files in an Electron webview with full application privileges rather than in an isolated context, the injected script gains unrestricted access to Node.js APIs, file system, and process management. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), compounded by insufficient allowlist enforcement on HTML tags and attributes.
Know when Siyuan gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
SiYuan is an open-source personal knowledge management system. In versions 3.6.1 through 3.6.3, a prior fix for XSS in bazaar README rendering (incomplete fix for CVE-2026-33066) enabled the Lute HTML sanitizer, but the sanitizer does not block iframe tags, and its URL-prefix blocklist does not effectively filter srcdoc attributes which contain raw HTML rather than URLs. A malicious bazaar package author can include an iframe with a srcdoc attribute containing embedded scripts in their README. When other users view the package in SiYuan's marketplace UI, the payload executes in the Electron context with full application privileges, enabling arbitrary code execution on the user's machine. This issue has been fixed in version 3.6.4.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)GitHub Advisory
SQL injection in SiYuan's fullTextSearchAssetContent endpoint lets unauthenticated attackers and holders of publish Role
Stored cross-site scripting in SiYuan personal knowledge management before 3.7.0 lets an attacker with write access to a
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
Stored cross-site scripting in SiYuan's attribute-view (database) cell renderer, affecting all versions prior to 3.7.0,
SQL injection in SiYuan personal knowledge-management software (all versions before v3.7.3) lets attackers inject arbitr
A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c
SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex
Remote code execution in SiYuan note-taking application (before v3.6.1) allows any malicious Bazaar marketplace package
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB