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-31807

CVE-2026-31807: B3log Siyuan XSS Vulnerability

CVE-2026-31807 is an XSS flaw in B3log Siyuan that exploits SVG animation elements to bypass sanitization and inject JavaScript. This post covers the technical details, affected versions, impact, and mitigation strategies.

Published: March 13, 2026

CVE-2026-31807 Overview

CVE-2026-31807 is a Cross-Site Scripting (XSS) vulnerability in SiYuan, a personal knowledge management system developed by B3log. The vulnerability exists in SiYuan's SVG sanitizer (SanitizeSVG) which fails to block SVG animation elements such as <animate> and <set>. While the sanitizer correctly blocks dangerous elements like <script>, <iframe>, and <foreignobject>, and removes on* event handlers and javascript: in href attributes, attackers can leverage SVG animation elements to dynamically set attributes to dangerous values at runtime, effectively bypassing the static sanitization.

This vulnerability is a bypass of the fix for CVE-2026-29183 which was addressed in version 3.5.9. The flaw allows attackers to inject executable JavaScript into the unauthenticated /api/icon/getDynamicIcon endpoint when using type=8, resulting in a reflected XSS attack.

Critical Impact

Attackers can execute arbitrary JavaScript in the context of a victim's browser session, potentially leading to session hijacking, credential theft, or malicious actions performed on behalf of authenticated users.

Affected Products

  • B3log SiYuan versions prior to 3.5.10

Discovery Timeline

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

Technical Details for CVE-2026-31807

Vulnerability Analysis

The vulnerability stems from an incomplete implementation of the SVG sanitization logic in SiYuan's SanitizeSVG function. Modern SVG specifications include animation elements (<animate> and <set>) that can dynamically modify element attributes after the initial DOM parsing. These elements allow attackers to set values that would normally be blocked by static analysis.

When an SVG file is processed by the sanitizer, it passes through checks that block known dangerous elements and remove event handler attributes. However, because SVG animation elements are legitimate SVG features, they are not blocked. An attacker can craft an SVG that uses these animation elements to set href attributes to javascript: URIs or manipulate other attributes at runtime, after the sanitization phase has completed.

The vulnerable endpoint /api/icon/getDynamicIcon with parameter type=8 is unauthenticated, meaning any user visiting a malicious link can trigger the XSS without requiring prior authentication to the SiYuan instance.

Root Cause

The root cause is insufficient allowlist/blocklist implementation in the SVG sanitizer. While the SanitizeSVG function was designed to strip dangerous elements and attributes, it did not account for SVG animation elements that can modify the DOM dynamically. Static analysis of SVG content alone cannot detect attributes that are set via animation at runtime.

This represents a classic case of sanitizer bypass where the security boundary fails to account for browser behavior that differs from static parsing assumptions.

Attack Vector

The attack is network-based and requires user interaction. An attacker crafts a malicious URL pointing to the /api/icon/getDynamicIcon endpoint with a specially crafted SVG payload embedded. When a victim clicks the link, the SVG is rendered in their browser, the animation elements execute, and JavaScript code runs in the context of the victim's session.

The exploitation flow involves creating an SVG that uses <animate> or <set> elements to change an attribute (such as href on an <a> tag) to a javascript: URI after the sanitizer has processed the content. When the browser renders the SVG and the animation executes, the malicious JavaScript payload is triggered.

For detailed technical information on the vulnerability mechanism and proof-of-concept details, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-31807

Indicators of Compromise

  • HTTP requests to /api/icon/getDynamicIcon endpoint with type=8 parameter containing SVG content with <animate> or <set> elements
  • SVG files containing animation elements that modify href, xlink:href, or other potentially dangerous attributes
  • Unexpected JavaScript execution originating from SVG icon rendering

Detection Strategies

  • Implement web application firewall (WAF) rules to detect SVG payloads containing <animate> or <set> elements in conjunction with javascript: strings
  • Monitor HTTP access logs for anomalous requests to the /api/icon/getDynamicIcon endpoint with suspicious query parameters
  • Deploy browser-based security controls that detect XSS attempts from SVG content

Monitoring Recommendations

  • Enable verbose logging on SiYuan instances to capture all requests to the /api/icon/ API endpoints
  • Set up alerts for any HTTP 200 responses to /api/icon/getDynamicIcon requests from external or untrusted sources
  • Review web server logs for patterns indicative of XSS probing attempts

How to Mitigate CVE-2026-31807

Immediate Actions Required

  • Upgrade SiYuan to version 3.5.10 or later immediately
  • If immediate patching is not possible, restrict network access to SiYuan instances to trusted users only
  • Consider placing a reverse proxy with SVG filtering capabilities in front of SiYuan deployments

Patch Information

The vulnerability is fixed in SiYuan version 3.5.10. Users should upgrade to this version or later to remediate the vulnerability. The fix enhances the SanitizeSVG function to block SVG animation elements that can be used to bypass the existing sanitization. For more details, see the GitHub Security Advisory.

Workarounds

  • Block access to the /api/icon/getDynamicIcon endpoint at the network level if the dynamic icon functionality is not required
  • Implement Content Security Policy (CSP) headers that restrict script execution from SVG content
  • Deploy a web application firewall rule to strip or block SVG animation elements from incoming requests
bash
# Example nginx configuration to block the vulnerable endpoint
location /api/icon/getDynamicIcon {
    # Block requests with type=8 parameter until patched
    if ($arg_type = "8") {
        return 403;
    }
    proxy_pass http://siyuan_backend;
}

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-31809: 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