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

0
Medium
VulnerabilityCVE-2026-31809cvecve-2026-31809cwe-79
Published: Tue Mar 10 2026 (03/10/2026, 20:58:36 UTC)
Source: CVE Database V5
Vendor/Project: siyuan-note
Product: siyuan

Description

CVE-2026-31809 is a reflected cross-site scripting (XSS) vulnerability in SiYuan personal knowledge management system versions prior to 3. 5. 10. The issue arises from improper sanitization of SVG href attributes, where ASCII whitespace characters are used to bypass the javascript: prefix check. This allows attackers to inject and execute arbitrary JavaScript via the unauthenticated /api/icon/getDynamicIcon endpoint. The vulnerability is a second bypass of a previous fix (CVE-2026-29183) and has a CVSS score of 6. 4 (medium severity). Exploitation requires user interaction but no authentication. The vulnerability affects confidentiality and integrity by enabling script execution in users' browsers, potentially leading to session hijacking or other attacks. The flaw is fixed in version 3.

AI-Powered Analysis

AILast updated: 03/10/2026, 21:29:25 UTC

Technical Analysis

CVE-2026-31809 is a reflected cross-site scripting (XSS) vulnerability in the SiYuan note-taking application, specifically in versions before 3.5.10. SiYuan uses an SVG sanitizer component (SanitizeSVG) to check href attributes for the presence of the 'javascript:' URI scheme to prevent script injection. The sanitizer uses the Go function strings.HasPrefix() to detect the 'javascript:' prefix. However, this check is bypassed when an attacker inserts ASCII tab (\t, 	), newline (\n, 
), or carriage return (\r, 
) characters within the 'javascript:' string. According to the WHATWG URL specification, browsers strip these whitespace characters before parsing the URL scheme, causing the JavaScript to execute despite the sanitizer's check. This vulnerability allows an attacker to inject executable JavaScript code into the unauthenticated /api/icon/getDynamicIcon endpoint, resulting in reflected XSS. This is a second bypass of a prior fix for CVE-2026-29183, which was addressed in version 3.5.9. The vulnerability was publicly disclosed on March 10, 2026, with a CVSS 4.0 score of 6.4, indicating medium severity. No known exploits are currently reported in the wild. The vulnerability impacts confidentiality and integrity by enabling script execution in victims' browsers, potentially leading to session hijacking, credential theft, or unauthorized actions performed on behalf of the user. The vulnerability does not require authentication but does require user interaction (e.g., clicking a crafted link). The issue is resolved in SiYuan version 3.5.10.

Potential Impact

The reflected XSS vulnerability in SiYuan can have significant impacts on organizations using this software for personal knowledge management. Attackers can exploit this flaw to execute arbitrary JavaScript in the context of the victim's browser, potentially stealing session tokens, credentials, or other sensitive information. This can lead to unauthorized access to user data or manipulation of the application interface. Since the vulnerable endpoint is unauthenticated, any user visiting a maliciously crafted URL could be targeted. The vulnerability undermines user trust and could facilitate further attacks such as phishing or malware delivery. Organizations relying on SiYuan for sensitive or proprietary information risk data leakage and compromise of user accounts. Although no exploits are currently known in the wild, the ease of bypassing the sanitizer and the public disclosure increase the likelihood of exploitation attempts. The impact is primarily on confidentiality and integrity, with availability not directly affected.

Mitigation Recommendations

To mitigate this vulnerability, organizations should immediately upgrade SiYuan to version 3.5.10 or later, where the issue is fixed. If upgrading is not immediately possible, implement strict input validation and output encoding on the /api/icon/getDynamicIcon endpoint to prevent injection of malicious scripts. Employ Content Security Policy (CSP) headers to restrict the execution of inline scripts and limit the sources of executable code. Monitor web traffic for suspicious requests targeting the vulnerable endpoint. Educate users to avoid clicking untrusted links, especially those that could exploit reflected XSS. Additionally, review and harden SVG sanitization logic to correctly handle whitespace characters within URI schemes. Regularly audit and test web applications for XSS vulnerabilities using automated scanners and manual penetration testing. Finally, maintain an incident response plan to quickly address any exploitation attempts.

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-09T16:33:42.913Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69b089ca2f860ef943c11e93

Added to database: 3/10/2026, 9:14:50 PM

Last enriched: 3/10/2026, 9:29:25 PM

Last updated: 3/10/2026, 11:20:44 PM

Views: 5

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