Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-31809

CVE-2026-31809: B3log Siyuan XSS Vulnerability

CVE-2026-31809 is a reflected XSS vulnerability in B3log Siyuan that bypasses SVG sanitization using whitespace characters in JavaScript URLs. This article covers the technical details, affected versions, and mitigation.

Published: March 13, 2026

CVE-2026-31809 Overview

SiYuan is a personal knowledge management system that contains a Cross-Site Scripting (XSS) vulnerability in its SVG sanitizer component. Prior to version 3.5.10, SiYuan's SanitizeSVG function checks href attributes for the javascript: prefix using strings.HasPrefix(). However, inserting ASCII tab ( ), newline ( ), or carriage return ( ) characters inside the javascript: string bypasses this prefix check. Browsers strip these characters per the WHATWG URL specification before parsing the URL scheme, so the JavaScript still executes. This allows an attacker to inject executable JavaScript into the unauthenticated /api/icon/getDynamicIcon endpoint, creating a reflected XSS vulnerability. Notably, this is a second bypass of the fix for CVE-2026-29183 (fixed in v3.5.9).

Critical Impact

Attackers can execute arbitrary JavaScript in victim browsers through the unauthenticated /api/icon/getDynamicIcon endpoint, potentially leading to session hijacking, credential theft, or malicious actions performed under the victim's identity.

Affected Products

  • B3log SiYuan versions prior to 3.5.10
  • SiYuan installations with exposed /api/icon/getDynamicIcon endpoints

Discovery Timeline

  • 2026-03-10 - CVE-2026-31809 published to NVD
  • 2026-03-11 - Last updated in NVD database

Technical Details for CVE-2026-31809

Vulnerability Analysis

This vulnerability is a reflected Cross-Site Scripting (XSS) flaw that stems from an incomplete fix for a previously disclosed vulnerability (CVE-2026-29183). The core issue lies in SiYuan's SVG sanitization logic, specifically in the SanitizeSVG function which is responsible for filtering potentially malicious content from SVG data before rendering.

The sanitizer attempts to block JavaScript execution by checking if href attributes begin with the javascript: protocol. However, the implementation uses a simple string prefix check that does not account for control characters that browsers automatically strip during URL parsing.

Root Cause

The root cause is the use of strings.HasPrefix() for security-sensitive URL scheme validation. This approach fails to consider that the WHATWG URL specification instructs browsers to remove ASCII tab, newline, and carriage return characters before scheme parsing. An attacker can insert these control characters within the javascript: string (e.g., java\tscript:, java\nscript:, or java\rscript:) to evade the prefix check while still achieving JavaScript execution when the browser normalizes the URL.

This represents a classic filter bypass pattern where the sanitization logic operates on a different representation of the input than the component that ultimately processes it (the browser's URL parser).

Attack Vector

The attack vector is network-based and requires user interaction. An attacker crafts a malicious URL targeting the unauthenticated /api/icon/getDynamicIcon endpoint with an SVG payload containing a specially crafted href attribute. When a victim clicks the malicious link or visits a page that loads the malicious SVG, their browser strips the control characters and executes the embedded JavaScript code.

The vulnerability is accessible without authentication, increasing its exploitability. The attacker can leverage this for:

  • Session token theft via document.cookie access
  • Credential harvesting through injected login forms
  • Malware distribution by redirecting users to malicious sites
  • Defacement of the knowledge management interface

For detailed technical information including proof-of-concept examples, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-31809

Indicators of Compromise

  • HTTP requests to /api/icon/getDynamicIcon containing encoded control characters (%09, %0A, %0D) within URL parameters
  • SVG content containing href attributes with whitespace or control characters before or within the javascript: string
  • Web server logs showing unusual GET requests to the dynamic icon API with long or obfuscated query parameters
  • JavaScript execution from SVG contexts that should not contain executable code

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect and block requests containing control characters in combination with javascript: patterns
  • Monitor HTTP logs for requests to /api/icon/getDynamicIcon with suspicious URL-encoded sequences
  • Deploy browser-based Content Security Policy (CSP) headers to mitigate XSS impact even if the vulnerability is exploited
  • Configure SIEM rules to correlate requests to vulnerable endpoints with anomalous user behavior patterns

Monitoring Recommendations

  • Enable verbose logging on the SiYuan application server to capture all requests to API endpoints
  • Set up alerting for multiple failed or suspicious requests to the /api/icon/getDynamicIcon endpoint from single IP addresses
  • Monitor for user reports of unexpected JavaScript behavior or redirects when using the SiYuan interface
  • Review Content Security Policy violation reports if CSP is implemented to detect attempted XSS exploitation

How to Mitigate CVE-2026-31809

Immediate Actions Required

  • Upgrade SiYuan to version 3.5.10 or later immediately
  • If immediate upgrade is not possible, consider temporarily restricting access to the /api/icon/getDynamicIcon endpoint via reverse proxy or firewall rules
  • Implement strong Content Security Policy headers with script-src directives to limit JavaScript execution contexts
  • Review access logs for any evidence of prior exploitation attempts

Patch Information

This vulnerability is fixed in SiYuan version 3.5.10. The patch addresses the SVG sanitization bypass by implementing more robust URL scheme validation that properly handles control characters before checking for dangerous protocols. Users should update to this version or later through their standard update mechanism. For additional details, see the GitHub Security Advisory.

Workarounds

  • Restrict access to the /api/icon/getDynamicIcon endpoint using authentication middleware or IP-based access controls
  • Deploy a Web Application Firewall with rules to strip or block requests containing control characters in URL parameters
  • Implement a strict Content Security Policy that blocks inline JavaScript execution: Content-Security-Policy: script-src 'self'
  • Consider disabling dynamic icon functionality if it is not critical to your workflow until the patch can be applied
bash
# Example nginx configuration to restrict access to the vulnerable endpoint
location /api/icon/getDynamicIcon {
    # Temporarily deny access to vulnerable endpoint
    deny all;
    # Or restrict to trusted IPs only
    # allow 10.0.0.0/8;
    # deny all;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechB3log Siyuan

  • SeverityMEDIUM

  • CVSS Score6.4

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-32940: B3log Siyuan XSS Vulnerability

  • CVE-2026-31807: B3log Siyuan XSS Vulnerability

  • CVE-2026-29183: B3log Siyuan XSS Vulnerability

  • CVE-2026-40922: B3log Siyuan RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English