The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-32704

CVE-2026-32704: B3log Siyuan SQL Injection Vulnerability

CVE-2026-32704 is a SQL injection flaw in B3log Siyuan that allows authenticated users to execute arbitrary SQL queries and access sensitive data. This article covers the technical details, affected versions, and mitigation.

Published: March 20, 2026

CVE-2026-32704 Overview

CVE-2026-32704 is an authorization bypass vulnerability in SiYuan, a personal knowledge management system developed by B3log. Prior to version 3.6.1, the POST /api/template/renderSprig endpoint lacks proper role verification through the model.CheckAdminRole function, allowing any authenticated user to execute arbitrary SQL queries against the SiYuan workspace database. This broken access control flaw enables attackers to exfiltrate all note content, metadata, and custom attributes stored within the application.

Critical Impact

Any authenticated user can bypass authorization controls to execute arbitrary SQL queries, leading to complete data exfiltration of the entire SiYuan workspace database including sensitive notes, metadata, and user attributes.

Affected Products

  • B3log SiYuan versions prior to 3.6.1
  • SiYuan personal knowledge management deployments with authenticated user access
  • Self-hosted and cloud-based SiYuan installations running vulnerable versions

Discovery Timeline

  • 2026-03-16 - CVE CVE-2026-32704 published to NVD
  • 2026-03-17 - Last updated in NVD database

Technical Details for CVE-2026-32704

Vulnerability Analysis

This vulnerability stems from a missing authorization check (CWE-285: Improper Authorization) in the SiYuan template rendering API. The /api/template/renderSprig endpoint processes template rendering requests but fails to verify whether the requesting user has administrative privileges before executing database operations. This architectural oversight allows low-privileged authenticated users to craft malicious requests that directly interact with the underlying workspace database.

The Sprig template engine, when combined with database access functions, provides a powerful but dangerous capability when exposed without proper authorization controls. An attacker with basic authenticated access can leverage this endpoint to construct and execute arbitrary SQL queries, completely bypassing the intended access control model.

Root Cause

The root cause is a missing call to model.CheckAdminRole in the request handler for the /api/template/renderSprig endpoint. While other sensitive API endpoints in SiYuan properly verify administrative privileges before processing requests, this particular endpoint was deployed without the necessary authorization gate. This creates a privilege escalation vector where any authenticated user can perform actions that should be restricted to administrators only.

Attack Vector

The vulnerability is exploitable over the network by any authenticated user. The attack requires low privileges (basic authenticated access) and no user interaction. An attacker would need to:

  1. Authenticate to the SiYuan application with any valid user account
  2. Craft a malicious POST request to the /api/template/renderSprig endpoint
  3. Include SQL query payloads within the Sprig template syntax
  4. Extract sensitive data from the database response

The attack surface includes all note content, metadata fields, custom attributes, and potentially other stored information within the SiYuan workspace database. Since no special privileges are required beyond basic authentication, the barrier to exploitation is relatively low for insider threats or compromised user accounts.

Detection Methods for CVE-2026-32704

Indicators of Compromise

  • Unusual volume of requests to /api/template/renderSprig endpoint from non-administrator accounts
  • SQL-like patterns appearing in template rendering request bodies
  • Large data responses from the template rendering API that may indicate data exfiltration
  • Authentication logs showing access to sensitive endpoints by users without administrative roles

Detection Strategies

  • Implement web application firewall (WAF) rules to detect SQL injection patterns in requests to /api/template/renderSprig
  • Monitor API access logs for template rendering requests from users who should not have administrative access
  • Deploy anomaly detection to identify unusual data volume patterns in API responses
  • Review authentication and authorization logs for privilege escalation attempts

Monitoring Recommendations

  • Enable detailed logging for all requests to the /api/template/renderSprig endpoint
  • Set up alerts for any template rendering activity from non-administrator user accounts
  • Monitor database query logs for unexpected SELECT statements or data extraction patterns
  • Implement network-level monitoring for large data egress following API interactions

How to Mitigate CVE-2026-32704

Immediate Actions Required

  • Upgrade SiYuan to version 3.6.1 or later immediately
  • Review access logs for any evidence of exploitation prior to patching
  • Audit user accounts to identify any unauthorized access to sensitive data
  • Consider temporarily restricting access to the SiYuan instance until patching is complete

Patch Information

B3log has addressed this vulnerability in SiYuan version 3.6.1 by adding the missing model.CheckAdminRole authorization check to the /api/template/renderSprig endpoint. Organizations should update to version 3.6.1 or later to remediate this vulnerability. For detailed information about the fix, refer to the GitHub Security Advisory GHSA-4j3x-hhg2-fm2x.

Workarounds

  • Implement network-level access controls to restrict who can reach the SiYuan API endpoints
  • Deploy a reverse proxy or WAF to filter requests to /api/template/renderSprig until patching is possible
  • Temporarily disable or restrict the template rendering functionality if not business-critical
  • Limit authenticated access to only trusted users until the system can be upgraded

If you cannot immediately upgrade, consider implementing additional authentication layers or temporarily taking the SiYuan instance offline until the patch can be applied. Review the security advisory for additional mitigation guidance from the vendor.

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechB3log Siyuan

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-285
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-29073: B3log Siyuan SQLi Vulnerability

  • CVE-2024-53504: B3log Siyuan SQL Injection Vulnerability

  • CVE-2026-33476: B3log Siyuan Path Traversal Vulnerability

  • CVE-2026-33194: B3log Siyuan Path Traversal 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