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-34605: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in siyuan-note siyuan

0
High
VulnerabilityCVE-2026-34605cvecve-2026-34605cwe-79
Published: Tue Mar 31 2026 (03/31/2026, 21:50:10 UTC)
Source: CVE Database V5
Vendor/Project: siyuan-note
Product: siyuan

Description

CVE-2026-34605 is a high-severity cross-site scripting (XSS) vulnerability in SiYuan, a personal knowledge management system, affecting versions 3. 6. 0 to before 3. 6. 2. The vulnerability arises because the SanitizeSVG function intended to block malicious SVG content can be bypassed by using namespace-prefixed element names like <x:script>. The Go HTML5 parser treats such tags as distinct from <script>, allowing malicious scripts embedded in SVG images to execute when the SVG is opened directly in a browser. This occurs due to the SVG being served with the image/svg+xml content type and no Content Security Policy. The issue has been fixed in version 3. 6.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/31/2026, 22:08:30 UTC

Technical Analysis

The vulnerability CVE-2026-34605 affects SiYuan versions 3.6.0 through 3.6.1 and is a cross-site scripting (XSS) flaw classified under CWE-79. SiYuan introduced a SanitizeSVG function in version 3.6.0 to mitigate XSS risks in the unauthenticated /api/icon/getDynamicIcon endpoint, which serves SVG images. However, this sanitization can be bypassed by crafting SVG elements with namespace-prefixed tags such as <x:script xmlns:x="http://www.w3.org/2000/svg">. The Go HTML5 parser used by SiYuan records the tag as "x:script" rather than "script", causing the sanitization logic to miss it and allow the malicious script through. When a victim opens the SVG directly in a browser, the XML parser resolves the namespace prefix to the SVG namespace, effectively executing the embedded script. The SVG is served with the Content-Type header set to image/svg+xml and lacks a Content Security Policy (CSP), which would otherwise restrict script execution. This vulnerability enables attackers to execute arbitrary JavaScript in the context of the victim’s browser, potentially leading to session hijacking, data theft, or further exploitation. The flaw does not require authentication or privileges but does require user interaction to open the malicious SVG. The issue was patched in version 3.6.2 by improving SVG sanitization. No known exploits are reported in the wild as of the publication date. The CVSS 4.0 vector indicates network attack vector, low attack complexity, no privileges required, user interaction needed, and high impact on confidentiality and integrity, with limited availability impact.

Potential Impact

This vulnerability can have significant impacts on organizations using affected versions of SiYuan, especially those who allow unauthenticated users to upload or access SVG content via the vulnerable endpoint. Successful exploitation can lead to arbitrary script execution in users’ browsers, enabling theft of sensitive information such as authentication tokens, personal data, or intellectual property stored within the SiYuan environment. It can also facilitate further attacks like phishing, session hijacking, or malware delivery. Since SiYuan is a personal knowledge management system, compromise could result in loss of confidentiality and integrity of user data. The lack of Content Security Policy exacerbates the risk by allowing scripts to run unrestricted. Although exploitation requires user interaction (opening the SVG), the vulnerability is remotely exploitable without authentication, increasing its threat level. Organizations relying on SiYuan for knowledge management or collaboration should consider the risk of data leakage and reputational damage if exploited.

Mitigation Recommendations

The primary mitigation is to upgrade SiYuan to version 3.6.2 or later, where the vulnerability is patched. Until upgrade is possible, organizations should implement strict input validation and sanitization on all SVG content, especially for namespace-prefixed elements, to prevent malicious scripts from being embedded. Deploying a Content Security Policy (CSP) that restricts script execution in SVG content can reduce risk by blocking inline scripts or scripts from untrusted sources. Additionally, restricting or disabling the ability for unauthenticated users to upload or access SVG files via the /api/icon/getDynamicIcon endpoint can limit exposure. Monitoring and logging access to this endpoint may help detect exploitation attempts. Educating users to avoid opening SVG files from untrusted sources can reduce the likelihood of successful attacks. Finally, consider employing web application firewalls (WAFs) with rules to detect and block malicious SVG payloads containing namespace-prefixed script elements.

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-30T17:15:52.500Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69cc424fe6bfc5ba1d44f4c8

Added to database: 3/31/2026, 9:53:19 PM

Last enriched: 3/31/2026, 10:08:30 PM

Last updated: 3/31/2026, 11:19:30 PM

Views: 2

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