CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-34605

CVE-2026-34605: Reflected Cross-Site Scripting via SVG Namespace Bypass in SiYuan

Alon Barad
Alon Barad
Software Engineer

Apr 1, 2026·6 min read·96 visits

Executive Summary (TL;DR)

A flaw in SiYuan's `SanitizeSVG` function allows attackers to bypass XSS filters using XML namespace prefixes (e.g., `<x:script>`). This enables unauthenticated remote code execution within the victim's browser context. The issue affects versions 3.6.0 to 3.6.1 and is fixed in 3.6.2.

SiYuan personal knowledge management system versions 3.6.0 through 3.6.1 contain a high-severity Reflected Cross-Site Scripting (XSS) vulnerability. The flaw exists in the SVG sanitization logic within the `/api/icon/getDynamicIcon` endpoint, where an attacker can bypass tag blocklists using XML namespace prefixes. Successful exploitation allows unauthenticated attackers to execute arbitrary JavaScript in the context of the victim's session.

Vulnerability Overview

The SiYuan personal knowledge management system exposes an unauthenticated API endpoint at /api/icon/getDynamicIcon designed to serve dynamic SVG icons to clients. This endpoint accepts user-controlled input, presumably base64-encoded or directly parameterized SVG data, and reflects it back to the requester. To prevent malicious code execution, the application routes the input through a custom SanitizeSVG function introduced in version 3.6.0.

This sanitization function contains a critical logic flaw classified under CWE-79 (Improper Neutralization of Input During Web Page Generation). The filter fails to account for XML namespace prefixes when evaluating HTML5/SVG node names. Consequently, an attacker can construct a payload that passes the backend validation but executes as a malicious script when parsed by the victim's browser.

The vulnerability requires user interaction to exploit, specifically requiring the victim to open a maliciously crafted URL pointing to the vulnerable SiYuan instance. Because the application serves the response with an image/svg+xml content type and lacks a restrictive Content Security Policy (CSP), the browser natively executes the embedded JavaScript. This grants the attacker full access to the application's DOM and the victim's active session.

Root Cause Analysis

The root cause of CVE-2026-34605 lies in a mismatch between how the backend Go HTML5 parser interprets SVG nodes and how a frontend browser's XML parser resolves them. The SanitizeSVG function processes incoming SVG data by parsing it into a node tree and walking the tree to filter out restricted tags. The security logic enforces a strict string matching algorithm, specifically targeting known dangerous elements like the <script> tag.

When the Go HTML5 parser encounters an element with an XML namespace prefix, such as <x:script xmlns:x="http://www.w3.org/2000/svg">, it records the node's tag name exactly as written: x:script. The sanitization routine subsequently compares this tag name against its blocklist. Since the literal string x:script does not equal script, the evaluation yields false, and the node is permitted to pass through the filter untouched.

Modern web browsers implement robust XML parsing engines that strictly adhere to W3C namespace specifications. When the browser receives the sanitized payload served with the image/svg+xml MIME type, it recognizes the xmlns:x attribute and resolves the x: prefix to the designated SVG namespace. The browser then strips the prefix during DOM construction, treating the element as a standard <script> tag and immediately executing its textual content as JavaScript.

Code Analysis and Data Flow

The underlying defect is a classic parser differential. The backend relies on a simplistic string comparison that fails to normalize XML local names before evaluation. A conceptual representation of the vulnerable logic demonstrates the flaw:

// Vulnerable Conceptual Implementation
func SanitizeSVG(input string) string {
    // Go HTML5 parser preserves the 'x:script' prefix
    nodeName := extractNodeName(input) 
    
    // Blocklist explicitly checks for 'script' without stripping prefixes
    if nodeName == "script" || nodeName == "iframe" || nodeName == "object" {
        return removeNode(input)
    }
    return input
}

To remediate this issue, the parsing logic must evaluate the local name of the element rather than the raw, prefixed tag name. The fix implemented in version 3.6.2 ensures that namespace prefixes are stripped or properly resolved before the blocklist comparison occurs. Alternatively, an allowlist approach strictly permitting only known-safe SVG structural elements entirely eliminates this class of bypass.

The following diagram illustrates the data flow of the exploit, demonstrating how the payload circumvents the backend filter but triggers execution in the frontend:

Exploitation Methodology

Exploitation of CVE-2026-34605 relies on delivering a crafted URL to an authenticated user of the targeted SiYuan instance. The attacker constructs an SVG payload containing the namespace-prefixed script tag. The payload definition establishes a custom namespace alias mapping back to the standard W3C SVG namespace.

The proof-of-concept payload demonstrates the required structural elements:

<svg xmlns="http://www.w3.org/2000/svg">
  <x:script xmlns:x="http://www.w3.org/2000/svg">alert('CVE-2026-34605')</x:script>
</svg>

The attacker typically base64-encodes or URL-encodes this payload depending on the specific parameter requirements of the getDynamicIcon endpoint. The resulting URL is distributed via phishing emails, direct messages, or embedded as a link in external forums. When the victim clicks the link, their browser issues a GET request to the vulnerable endpoint.

Because the endpoint is unauthenticated, the application processes the request regardless of the victim's session state. The server reflects the payload back to the client. If the victim has an active session within the SiYuan application on the same domain, the executed JavaScript gains full access to their session tokens, local storage, and the application's authenticated APIs.

Impact Assessment

The CVSS 4.0 assessment assigns this vulnerability a base score of 8.6, reflecting a High severity profile. The vector string CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N highlights the primary risk factors: network-based attack vector, low complexity, no authentication requirement, and high impact on confidentiality and integrity.

The confidentiality impact (VC:H) stems from the attacker's ability to exfiltrate sensitive data. The executed JavaScript can read the victim's personal knowledge base, extract session cookies, and capture CSRF tokens. This data is silently transmitted to an attacker-controlled server using standard web APIs like fetch or XMLHttpRequest.

The integrity impact (VI:H) is equally severe. An attacker can leverage the compromised session to manipulate the user's data. This includes modifying existing notes, deleting workspaces, or injecting persistent XSS payloads into the stored knowledge base, effectively upgrading a reflected XSS vulnerability into a stored XSS vector. The availability impact (VA:L) remains low, as the attack primarily targets user data rather than the underlying server infrastructure.

Remediation and Mitigation Strategies

The primary and most effective remediation for CVE-2026-34605 is updating the SiYuan application to version 3.6.2 or later. The patch addresses the root cause by correcting the SVG sanitization logic to properly handle XML namespace prefixes, preventing the bypass condition.

For environments where immediate patching is not feasible, administrators must implement compensating controls. Deploying Web Application Firewall (WAF) rules to inspect incoming requests to the /api/icon/getDynamicIcon endpoint provides an effective temporary mitigation. The WAF should drop requests containing the xmlns attribute or namespace aliases (e.g., x:, ns1:) within the icon parameter payload.

Furthermore, implementing a strict Content Security Policy (CSP) provides architectural defense-in-depth against XSS vulnerabilities. Configuring the application to serve API responses with a CSP header that restricts script execution (e.g., default-src 'none') neutralizes the attack even if the backend parser fails to sanitize the payload. Administrators should also ensure the application configures the X-Content-Type-Options: nosniff header across all API endpoints.

Official Patches

siyuan-noteFixed Release 3.6.2

Technical Appendix

CVSS Score
8.6/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N

Affected Systems

SiYuan Web ApplicationSiYuan Desktop Application (if utilizing the vulnerable endpoint for rendering)

Affected Versions Detail

Product
Affected Versions
Fixed Version
SiYuan
siyuan-note
>= 3.6.0, < 3.6.23.6.2
AttributeDetail
CWE IDCWE-79 (Improper Neutralization of Input During Web Page Generation)
Attack VectorNetwork
CVSS Score8.6 (High)
ImpactHigh Confidentiality, High Integrity
Exploit StatusProof of Concept Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Cross-site Scripting

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Known Exploits & Detection

Context ResearchProof of Concept demonstrating SVG namespace prefix bypass.

Vulnerability Timeline

Vulnerability publicly disclosed via GitHub Security Advisory.
2026-03-31
CVE-2026-34605 published to the National Vulnerability Database (NVD).
2026-03-31

References & Sources

  • [1]GitHub Security Advisory GHSA-73g7-86qr-jrg3
  • [2]SiYuan Release v3.6.2
  • [3]SiYuan Issue Tracker #17246
  • [4]NVD Record CVE-2026-34605
Related Vulnerabilities
CVE-2026-34605

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•23 minutes ago•CVE-2026-105744
7.5

CVE-2026-105744: Arbitrary File Read and Remote Code Execution in Docling Tectonic Engine

Docling, a tool for parsing and processing diverse document formats, is vulnerable to arbitrary file read, arbitrary file write, and potential remote code execution (RCE) in versions 2.94.0 through 2.131.0. The vulnerability occurs when applications configure Docling to use the Tectonic engine for rendering TikZ diagrams into images. Because the compilation did not restrict hazardous TeX primitives or sandbox the environment, an attacker can supply crafted documents containing malicious TikZ definitions to access or modify local files and execute arbitrary commands under the privileges of the processing application.

Amit Schendel
Amit Schendel
1 views•7 min read
•about 1 hour ago•CVE-2026-105743
4.0

CVE-2026-105743: Server-Side Request Forgery Guard Bypass in Docling Document Conversion Engine

An SSRF guard bypass vulnerability in the Docling document conversion engine allows unauthenticated attackers to bypass internal IP access controls. The vulnerability exists due to a DNS rebinding Time-of-Check Time-of-Use (TOCTOU) condition, URL authority parsing inconsistencies, and unvalidated network requests triggered during headless browser page rendering.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 2 hours ago•CVE-2026-105742
3.7

CVE-2026-105742: Sensitive Custom Header Leakage in Docling Image Resource Loader

A technical analysis of CVE-2026-105742 (GHSA-p3fw-7699-7926), a sensitive information disclosure vulnerability in the Docling document processing library. Vulnerable versions of Docling indiscriminately forward custom HTTP headers, such as authentication tokens, to arbitrary third-party origins and during cross-origin redirects while fetching remote image assets from untrusted HTML and EPUB documents.

Alon Barad
Alon Barad
5 views•6 min read
•about 3 hours ago•CVE-2026-106121
4.9

CVE-2026-106121: Denial of Service via Infinite Loop in RabbitMQ Java Client JSON Parser

CVE-2026-106121 is a Denial of Service (DoS) vulnerability in the RabbitMQ Java Client library (amqp-client) affecting versions prior to 5.37.0. The vulnerability resides in the legacy, custom JSON-RPC parsing class com.rabbitmq.tools.json.JSONReader. When parsing malformed or truncated payloads ending within a quoted string or single-line comment, the parser's scanner enters an infinite loop. This occurs because the loop lacks an exit condition for the end-of-input sentinel character returned by the iterator, leading to either CPU exhaustion or a JVM crash from an OutOfMemoryError.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 5 hours ago•CVE-2026-105646
4.9

CVE-2026-105646: Regular Expression Denial of Service in Ghost CMS Import Handlers

An authenticated Regular Expression Denial of Service (ReDoS) vulnerability in TryGhost Ghost (CMS) versions 4.0.0 through 6.66.x. An attacker with administrator privileges can upload crafted content import archives containing pathological directory names or migration patterns, triggering exponential backtracking in the Node.js V8 engine.

Alon Barad
Alon Barad
8 views•6 min read
•about 6 hours ago•CVE-2026-105645
4.9

CVE-2026-105645: Regular Expression Denial of Service (ReDoS) in Ghost CMS

CVE-2026-105645 is a regular expression denial of service (ReDoS) vulnerability affecting Ghost, an open-source Node.js content management system. The vulnerability exists within directory import handlers and the external media inliner, allowing authenticated administrators to trigger catastrophic backtracking in the V8 JavaScript engine, resulting in infinite loops, 100% CPU utilization, and total denial of service.

Amit Schendel
Amit Schendel
8 views•6 min read