CVE-2026-23847

6.1 MEDIUM

📋 TL;DR

SiYuan personal knowledge management systems before version 3.5.4 are vulnerable to reflected cross-site scripting (XSS) via the /api/icon/getDynamicIcon endpoint. Attackers can inject malicious SVG content that executes JavaScript in victims' browsers when they view specially crafted URLs. This affects all users running vulnerable versions of SiYuan.

💻 Affected Systems

Products:
  • SiYuan Personal Knowledge Management System
Versions: All versions prior to 3.5.4
Operating Systems: All platforms running SiYuan
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default configuration when the /api/icon/getDynamicIcon endpoint is accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, perform actions as the authenticated user, redirect to malicious sites, or install malware via drive-by downloads.

🟠

Likely Case

Session hijacking, credential theft, or defacement of the knowledge management interface through injected content.

🟢

If Mitigated

Limited impact with proper Content Security Policy (CSP) headers and input validation, though XSS could still execute in some contexts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability is well-documented in public advisories with technical details, making exploitation straightforward for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.5.4

Vendor Advisory: https://github.com/siyuan-note/siyuan/security/advisories/GHSA-w836-5gpm-7r93

Restart Required: Yes

Instructions:

1. Backup your SiYuan data. 2. Download and install SiYuan version 3.5.4 or later from the official repository. 3. Restart the SiYuan service or application.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side filtering to sanitize the 'content' parameter before processing in the SVG generation endpoint.

Not applicable - requires code modification

Content Security Policy

all

Implement strict CSP headers to prevent execution of inline scripts and restrict script sources.

Add header: Content-Security-Policy: script-src 'self'

🧯 If You Can't Patch

  • Restrict access to the /api/icon/getDynamicIcon endpoint using network controls or web application firewalls.
  • Implement output encoding for SVG content and validate all user input before processing.

🔍 How to Verify

Check if Vulnerable:

Test by accessing /api/icon/getDynamicIcon?type=8&content=<script>alert('XSS')</script> and checking if script executes in browser.

Check Version:

Check SiYuan version in application settings or via package manager: siyuan --version

Verify Fix Applied:

After patching, test the same payload - it should be properly escaped in the SVG output without script execution.

📡 Detection & Monitoring

Log Indicators:

  • Unusual requests to /api/icon/getDynamicIcon with script-like content in parameters
  • Multiple failed authentication attempts following icon requests

Network Indicators:

  • HTTP requests containing <script> tags or JavaScript in the 'content' parameter
  • Unusual outbound connections from SiYuan server after icon requests

SIEM Query:

source="siyuan" AND uri="/api/icon/getDynamicIcon" AND (param_content CONTAINS "<script>" OR param_content CONTAINS "javascript:")

🔗 References

📤 Share & Export