Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-32940: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in siyuan-note siyuan

0
Critical
VulnerabilityCVE-2026-32940cvecve-2026-32940cwe-79cwe-184
Published: Fri Mar 20 2026 (03/20/2026, 03:33:43 UTC)
Source: CVE Database V5
Vendor/Project: siyuan-note
Product: siyuan

Description

CVE-2026-32940 is a critical cross-site scripting (XSS) vulnerability in SiYuan personal knowledge management system versions 3. 6. 0 and below. The vulnerability arises from incomplete sanitization of SVG content in the unauthenticated /api/icon/getDynamicIcon endpoint, which improperly allows JavaScript execution via crafted SVGs using bypassed MIME types (data:text/xml and data:application/xml). An attacker can craft a URL that, when visited or embedded via <object> or <embed>, triggers JavaScript execution through injected interactive links inside SVG images. The vulnerability does not affect <img> tag rendering due to lack of interactivity. Exploitation requires user interaction (clicking the injected link) but no authentication. This issue has been fixed in version 3. 6. 1.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/27/2026, 19:36:48 UTC

Technical Analysis

SiYuan is a personal knowledge management system that, in versions 3.6.0 and earlier, contains a critical cross-site scripting vulnerability (CVE-2026-32940) due to improper input sanitization during web page generation. The root cause lies in the SanitizeSVG function, which attempts to block dangerous URI schemes in SVG href attributes but incompletely blocks only data:text/html and data:image/svg+xml, neglecting data:text/xml and data:application/xml. These latter MIME types can also render SVG content capable of executing JavaScript. The vulnerable endpoint, /api/icon/getDynamicIcon, accepts a user-controlled 'content' parameter that is directly injected into SVG markup using Go's fmt.Sprintf without any escaping or sanitization, and the response is served with Content-Type: image/svg+xml. This allows attackers to craft SVG images containing malicious JavaScript embedded in interactive links. When a victim navigates directly to the crafted URL or views the SVG embedded via <object> or <embed> tags, clicking the injected link triggers JavaScript execution, enabling a click-through XSS attack. The attack vector requires user interaction (clicking the link) but no authentication, and the vulnerability affects confidentiality and integrity by potentially stealing sensitive data or performing unauthorized actions in the victim's context. The vulnerability does not affect <img> tag rendering because it does not support interactive links. This issue was addressed and fixed in SiYuan version 3.6.1 by improving the sanitization logic to block all dangerous data URI schemes. The CVSS v3.1 score is 9.3, indicating critical severity with network attack vector, low attack complexity, no privileges required, user interaction required, and scope changed due to impact beyond the vulnerable component.

Potential Impact

This vulnerability poses a significant risk to organizations using SiYuan versions prior to 3.6.1, especially those deploying it in environments accessible over the internet. Successful exploitation can lead to theft of sensitive user data, session hijacking, or unauthorized actions performed with the victim's privileges, compromising confidentiality and integrity. Since the vulnerability is exploitable without authentication and remotely, attackers can target users by tricking them into visiting malicious URLs or embedding crafted SVGs in web pages or documents. The requirement for user interaction (clicking the injected link) limits automated exploitation but does not eliminate risk, particularly in phishing or social engineering scenarios. Organizations relying on SiYuan for knowledge management may face data breaches, loss of trust, and potential compliance violations. The vulnerability does not impact availability directly but can facilitate further attacks. Given the critical CVSS score and the nature of the vulnerability, it demands urgent remediation to prevent exploitation.

Mitigation Recommendations

Organizations should immediately upgrade SiYuan to version 3.6.1 or later, where the vulnerability is fixed. Until upgrade is possible, implement strict network access controls to restrict access to the /api/icon/getDynamicIcon endpoint, limiting it to trusted users or internal networks only. Employ web application firewalls (WAFs) with custom rules to detect and block requests containing suspicious SVG content or data URI schemes like data:text/xml and data:application/xml in href attributes. Educate users about the risks of clicking unknown or suspicious links, especially those involving SVG content. Review and sanitize any user-generated SVG content before rendering or embedding it in web pages or documents. Monitor logs for unusual requests to the vulnerable endpoint and signs of attempted exploitation. Consider disabling or restricting embedding of SVGs via <object> or <embed> tags in user-facing applications if feasible. Conduct regular vulnerability scanning and penetration testing to detect similar issues proactively.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-17T00:05:53.283Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69bcc873e32a4fbe5f2a7901

Added to database: 3/20/2026, 4:09:23 AM

Last enriched: 3/27/2026, 7:36:48 PM

Last updated: 5/3/2026, 11:24:27 PM

Views: 52

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses