Skip to main content

Siyuan CVE-2026-32940

CRITICAL
Cross-site Scripting (XSS) (CWE-79)
2026-03-20 security-advisories@github.com GHSA-4mx9-3c2h-hwhg
9.3
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious URL with data:text/xml payload
  2. Delivery
    User clicks link to /api/icon/getDynamicIcon endpoint
  3. Exploit
    SVG rendered with unescaped user input
  4. Execution
    JavaScript executes in victim browser
  5. Impact
    Session hijacking or credential theft

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

SiYuan versions 3.6.0 and below. Unauthenticated attacker exploits the /api/icon/getDynamicIcon endpoint with crafted content parameter using data:text/xml or data:application/xml URIs to bypass incomplete SVG sanitization. Victim must click attacker-supplied link to trigger XSS.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N) shows network-exploitable attacks with low complexity requiring no privileges but requiring user interaction, with changed scope and high confidentiality and integrity impact. The attack requires two user actions: navigating to a crafted URL and clicking an injected link, which substantially reduces practical exploitation likelihood compared to stored XSS. The unauthenticated attack vector is concerning for public-facing SiYuan instances, but the requirement for direct navigation to the endpoint or specific embedding techniques (object/embed tags) limits widespread exploitation. No KEV listing or EPSS score is provided in the intelligence data, and no proof-of-concept is explicitly mentioned, suggesting limited active exploitation. Real-world risk is moderate-to-high for internet-exposed instances with multiple users, but lower for private or single-user deployments. The Changed Scope rating indicates potential for cross-domain or cross-privilege boundary attacks, elevating risk in multi-tenant scenarios.

Exploit ScenarioDerived

An attacker crafts a malicious URL targeting the /api/icon/getDynamicIcon endpoint with a content parameter containing SVG markup with an href attribute using data:text/xml or data:application/xml encoding that embeds JavaScript. The attacker distributes this URL via phishing emails or social engineering to SiYuan users. When a victim clicks the link and then interacts with the rendered SVG element (such as clicking an injected link or button within the image), the JavaScript executes in the context of the SiYuan application, potentially stealing session cookies, performing unauthorized actions, or exfiltrating sensitive knowledge management data.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 20, 2026

SiYuan personal knowledge management system contains a cross-site scripting (XSS) vulnerability in versions 3.6.0 and below. An unauthenticated attacker can exploit the /api/icon/getDynamicIcon endpoint by crafting a malicious URL that bypasses SVG sanitization filters, allowing arbitrary JavaScript execution when a victim clicks an injected link within the rendered SVG. The CVSS score of 9.3 indicates critical severity, though exploitation requires user interaction (clicking a malicious link) and the attack complexity is low.

RemediationAI

Upgrade SiYuan to version 3.6.1 or later, which contains the security fix as documented in the release notes at https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1 and implemented in commit d01d561875d4f744e9f6232f1d4831e3642b8696. Until patching is completed, restrict network access to the /api/icon/getDynamicIcon endpoint using web application firewall rules or reverse proxy access controls to prevent untrusted users from accessing this API. Implement Content-Security-Policy headers with strict script-src directives to mitigate JavaScript execution from inline SVG sources. For internet-facing instances, consider requiring authentication for all API endpoints as an additional defense-in-depth measure.

Affected Packages

go github.com/siyuan-note/siyuan no fix

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

The vulnerability stems from an incomplete blocklist in the SanitizeSVG function (CWE-79: Improper Neutralization of Input During Web Page Generation). The sanitizer blocks data:text/html and data:image/svg+xml MIME types in href attributes but fails to filter data:text/xml and data:application/xml, both of which browsers can interpret as SVG with JavaScript execution capabilities. The /api/icon/getDynamicIcon endpoint uses fmt.Sprintf to inject user-controlled input from the content parameter directly into SVG markup without escaping, then serves it with Content-Type: image/svg+xml. This creates a click-through XSS attack vector where interactive SVG elements can trigger JavaScript, though the attack surface is limited since standard img tag rendering doesn't allow interactive links—attackers must either direct victims to the endpoint URL or embed it via object or embed tags.

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

GitHub Advisory PRIMARY 9.3 CRITICAL
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
SUSE CRITICAL

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

DescriptionGitHub Advisory

SiYuan is a personal knowledge management system. In versions 3.6.0 and below, SanitizeSVG has an incomplete blocklist - it blocks data:text/html and data:image/svg+xml in href attributes but misses data:text/xml and data:application/xml, both of which can render SVG with JavaScript execution. The unauthenticated /api/icon/getDynamicIcon endpoint serves user-controlled input (via the content parameter) directly into SVG markup using fmt.Sprintf with no escaping, served as Content-Type: image/svg+xml. This creates a click-through XSS: a victim navigates to a crafted URL, sees an SVG with an injected link, and clicking it triggers JavaScript via the bypassed MIME types. The attack requires direct navigation to the endpoint or <object>/<embed> embedding, since <img> tag rendering in the frontend doesn't allow interactive links. This issue has been fixed in version 3.6.1.

Executive ViewAI

Why It Matters

SiYuan users are at critical risk of account compromise and data theft through a malicious link attack that executes unauthorized code in their browsers. This vulnerability affects all installations of SiYuan 3.6.0 and below with no available patch, requiring immediate interim protective measures to prevent exploitation.

Business Impact: Severe
Compensating Controls

Deploy Web Application Firewall (WAF) rules to block requests to /api/icon/getDynamicIcon endpoint; implement strict Content Security Policy (CSP) headers preventing inline script execution; restrict SiYuan access to internal networks only via network segmentation; disable SVG icon functionality if operationally feasible; implement user awareness training on avoiding suspicious links; deploy endpoint detection and response (EDR) tools to monitor for malicious script execution; consider disabling the feature until patch availability.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Affected Products (CPE)GitHub Advisory

cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*

Related Vulnerabilities in SiYuan Knowledge Management XSS and Traversal

View all 2

More in Siyuan

View all
CVE-2026-69083 CRITICAL POC
9.9 Aug 03

SQL injection in SiYuan's fullTextSearchAssetContent endpoint lets unauthenticated attackers and holders of publish Role

CVE-2026-54067 CRITICAL POC
9.9 Jun 24

Stored cross-site scripting in SiYuan personal knowledge management before 3.7.0 lets an attacker with write access to a

CVE-2026-69084 CRITICAL POC
9.9 Aug 03

SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements

CVE-2026-54158 CRITICAL POC
9.9 Jun 24

Stored cross-site scripting in SiYuan's attribute-view (database) cell renderer, affecting all versions prior to 3.7.0,

CVE-2026-69085 CRITICAL POC
9.9 Aug 03

SQL injection in SiYuan personal knowledge-management software (all versions before v3.7.3) lets attackers inject arbitr

CVE-2024-53507 CRITICAL POC
9.8 Nov 29

A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t

CVE-2024-53506 CRITICAL POC
9.8 Nov 29

A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R

CVE-2024-53505 CRITICAL POC
9.8 Nov 29

A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti

CVE-2024-53504 CRITICAL POC
9.8 Nov 29

A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c

CVE-2026-23852 CRITICAL POC
9.6 Jan 19

SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex

CVE-2026-56397 CRITICAL POC
9.4 Jun 21

Remote code execution in SiYuan note-taking application (before v3.6.1) allows any malicious Bazaar marketplace package

CVE-2026-54069 CRITICAL POC
9.2 Jun 24

Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
openSUSE Leap 15.6 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP5 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP6 Fixed
openSUSE Leap 15.5 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy