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 in the SanitizeSVG function, which fails to block certain data URI schemes (data:text/xml and data:application/xml) that can embed SVG with executable JavaScript. An unauthenticated endpoint (/api/icon/getDynamicIcon) directly injects user-controlled input into SVG markup without proper escaping, served as image/svg+xml. This enables an attacker to craft a malicious URL that, when visited or embedded via <object> or <embed> tags, triggers JavaScript execution upon user interaction (click). The attack does not work via <img> tags due to lack of interactivity. The issue has been fixed in version 3. 6. 1.

AI-Powered Analysis

AILast updated: 03/20/2026, 04:24:16 UTC

Technical Analysis

The vulnerability CVE-2026-32940 affects SiYuan, a personal knowledge management system, in versions prior to 3.6.1. It stems from an incomplete sanitization mechanism in the SanitizeSVG function, which attempts to block dangerous data URI schemes in href attributes within SVG content but overlooks data:text/xml and data:application/xml. These overlooked schemes can embed SVG images containing JavaScript, enabling script execution. The unauthenticated API endpoint /api/icon/getDynamicIcon accepts a content parameter that is directly inserted into SVG markup using Go's fmt.Sprintf without any escaping or validation, and the response is served with the MIME type image/svg+xml. This creates a click-through cross-site scripting (XSS) vulnerability: an attacker can craft a URL that returns an SVG containing a malicious link. When a victim navigates to this URL or the SVG is embedded via <object> or <embed> tags, clicking the link triggers JavaScript execution in the victim's browser context. The vulnerability requires user interaction (click) and direct navigation or embedding, as <img> tags do not support interactive links in SVG. This flaw compromises confidentiality and integrity by enabling script injection and potential session hijacking or data theft. The vulnerability has been addressed in SiYuan version 3.6.1 by improving the sanitization logic to block the bypassed data URI schemes. No known exploits are reported in the wild as of now. The CVSS v3.1 score of 9.3 indicates a critical severity due to network attack vector, no privileges required, low attack complexity, requirement for user interaction, and a scope change affecting confidentiality and integrity.

Potential Impact

This vulnerability poses a significant risk to organizations using SiYuan versions 3.6.0 and below, especially those deploying it in environments accessible over the internet. Successful exploitation allows attackers to execute arbitrary JavaScript in the context of the victim's browser, potentially leading to session hijacking, theft of sensitive information, unauthorized actions on behalf of the user, or delivery of further malware. Since the vulnerable endpoint is unauthenticated and accessible remotely, attackers can craft malicious URLs that can be distributed via phishing or social engineering campaigns. The requirement for user interaction (click) somewhat limits automated exploitation but does not diminish the risk in targeted attacks. Organizations relying on SiYuan for knowledge management may face data confidentiality breaches and integrity violations. The vulnerability does not affect availability directly but can undermine trust and lead to indirect service disruptions. 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 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 data URI schemes in SVG content parameters. Educate users about the risks of clicking unknown or suspicious links, especially those pointing to SVG resources. Review and sanitize all user-supplied inputs that may be rendered as SVG or other markup formats, applying a whitelist approach rather than blacklists. Monitor logs for unusual access patterns to the vulnerable endpoint and signs of attempted exploitation. Consider disabling or restricting SVG rendering features if not essential. Finally, conduct security assessments and penetration tests focusing on SVG and other vector graphic handling in web applications.

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/20/2026, 4:24:16 AM

Last updated: 3/20/2026, 5:33:33 AM

Views: 3

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 in Console -> Billing 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