CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-32704

CVE-2026-32704: Improper Authorization and Information Disclosure in SiYuan Template Rendering

Alon Barad
Alon Barad
Software Engineer

Mar 14, 2026·5 min read·61 visits

Executive Summary (TL;DR)

A missing authorization check in SiYuan's `renderSprig` API endpoint allows low-privileged authenticated users to execute arbitrary SQL queries via malicious templates, exposing all workspace data.

SiYuan versions prior to 3.6.1 contain an improper authorization vulnerability in the template rendering API. An authenticated attacker can exploit a missing access control check to execute arbitrary SQL queries against the local workspace database, leading to high-impact information disclosure.

Vulnerability Overview

SiYuan is a personal knowledge management system that utilizes a local SQLite database to store user workspaces, notes, metadata, and custom attributes. The application exposes an administrative API to facilitate various backend operations, including the evaluation of templates via the Sprig library. This template engine is designed to allow administrators to dynamically generate content and query the underlying data structures.

CVE-2026-32704 is an improper authorization vulnerability (CWE-285) located in the POST /api/template/renderSprig endpoint. This specific route handles the parsing and execution of Sprig templates submitted via HTTP requests. The vulnerability arises because the endpoint fails to verify whether the requesting user possesses administrative privileges before processing the template.

Consequently, the application processes the template using the privileges of the application process itself. Since the SiYuan template engine explicitly exposes a SQL function to the template context, an authenticated attacker can leverage this endpoint to interact directly with the backend SQLite database.

Root Cause Analysis

The root cause of CVE-2026-32704 lies in the omission of the standard authorization middleware or check function on the renderSprig API route. In the SiYuan codebase, administrative endpoints are expected to invoke model.CheckAdminRole to validate the authorization token and role of the incoming request. This function ensures that only highly privileged users can access sensitive backend features.

The renderSprig endpoint was deployed without this crucial model.CheckAdminRole invocation. When an HTTP POST request reaches the route, the application only verifies that the request contains a valid authentication token, satisfying the low-privilege requirement. It then proceeds to pass the user-supplied JSON payload directly to the Sprig template rendering engine.

The Sprig environment configured by SiYuan includes custom functions tailored for workspace management. One of these functions, typically exposed as sql, accepts a raw SQL query string, executes it against the local SQLite database, and returns the result set to the template context. Because the authorization check is absent, any authenticated user can successfully invoke this powerful internal function.

Exploitation Methodology

Exploitation of CVE-2026-32704 requires the attacker to possess valid credentials or an authentication token for a non-administrative account on the target SiYuan instance. Network access to the application's API interface is also necessary. The attack vector relies entirely on standard HTTP requests, requiring no specialized tools beyond an HTTP client.

The attacker crafts a POST request to /api/template/renderSprig with a JSON body containing the template key. The value of this key contains the malicious Sprig payload. By utilizing the pipeline operator (|) in the template syntax, the attacker passes an arbitrary SQL query string into the sql function exposed by the engine.

POST /api/template/renderSprig HTTP/1.1
Host: [siyuan-host]
Authorization: Token [user-token]
Content-Type: application/json
 
{
  "template": "{{ \"SELECT * FROM blocks LIMIT 5\" | sql }}"
}

Upon processing the request, the backend evaluates the template, executes the embedded SELECT statement, and serializes the result. The application returns this data within the HTTP response body. An attacker can systematically query the database schema and exfiltrate all tables by altering the SQL payload in subsequent requests.

Impact Assessment

The vulnerability carries a CVSS v3.1 score of 6.5 (Medium severity), calculated with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N. The primary impact is a total loss of confidentiality for the data stored within the SiYuan workspace. The attack vector is network-based and involves low complexity, making it highly reproducible.

An attacker successfully exploiting this vulnerability gains read access to the entire SQLite database. This exposes all user notes, sensitive metadata, custom attributes, and application configuration settings. If the workspace contains proprietary information, credentials, or personal data, the exposure represents a severe security breach.

The CVSS vector indicates no impact on integrity or availability. The exposed SQL function within the template engine is typically restricted to data retrieval operations, preventing the execution of INSERT, UPDATE, or DELETE statements. However, the exact limitations depend on the underlying SQLite connection configuration and the specific implementation of the sql helper function.

Remediation and Detection

The vendor addressed CVE-2026-32704 in SiYuan version 3.6.1. The patch introduces the missing model.CheckAdminRole validation within the handler for the /api/template/renderSprig endpoint. This ensures that the application verifies administrative privileges before passing the request body to the template engine, effectively closing the unauthorized access vector.

Organizations operating SiYuan instances must upgrade to version 3.6.1 or later immediately. As an interim mitigation, administrators should ensure that SiYuan instances are strictly isolated from untrusted networks. Deploying a reverse proxy equipped with an external identity provider (e.g., OIDC) can restrict baseline access to the application, reducing the available attack surface.

Security teams can detect exploitation attempts by monitoring application and reverse proxy logs. A high volume of requests to the /api/template/renderSprig endpoint from standard user accounts indicates suspicious activity. Additionally, Web Application Firewalls (WAF) can be configured to inspect the template parameter in POST requests for common SQL keywords, providing an active defense layer against exfiltration payloads.

Official Patches

siyuan-noteGitHub Security Advisory

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected Systems

SiYuan Personal Knowledge Management System

Affected Versions Detail

Product
Affected Versions
Fixed Version
SiYuan
siyuan-note
< 3.6.13.6.1
AttributeDetail
CWE IDCWE-285
Attack VectorNetwork
CVSS Score6.5
ImpactHigh Confidentiality
Exploit StatusProof of Concept Available
AuthenticationRequired (Low Privilege)

MITRE ATT&CK Mapping

T1222File and Directory Permissions Modification
Defense Evasion
T1059.004Command and Scripting Interpreter: Unix Shell
Execution
CWE-285
Improper Authorization

The software does not perform or incorrectly performs an authorization check when an actor attempts to access a resource.

Vulnerability Timeline

Vulnerability publicly disclosed and CVE-2026-32704 assigned.
2026-03-13
GitHub Security Advisory (GHSA-4j3x-hhg2-fm2x) published.
2026-03-13

References & Sources

  • [1]GHSA-4j3x-hhg2-fm2x
  • [2]CVE-2026-32704 Record
  • [3]SiYuan GitHub Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•35 minutes ago•CVE-2026-77377
5.2

CVE-2026-77377: Authenticated Server-Side Request Forgery in Bolt CMS Backend Asynchronous Endpoints

Bolt CMS (bolt/core) versions prior to 6.1.4 contain a Server-Side Request Forgery (SSRF) vulnerability in the authenticated URL-upload (/async/upload-url) and media embed (/async/embed) endpoints. Backend users with file upload or media embedding privileges can supply arbitrary URLs that the application fetches without destination IP validation. This allows authenticated attackers to force the server to initiate HTTP requests to loopback interfaces, RFC 1918 private networks, and cloud instance metadata services.

Amit Schendel
Amit Schendel
1 views•10 min read
•about 2 hours ago•CVE-2026-77379
5.3

CVE-2026-77379: Information Disclosure in Bolt CMS Public Relation API

Bolt CMS prior to version 6.1.4 contains an information disclosure vulnerability in its public Relation API endpoints. The Doctrine ORM query extension (ContentExtension) fails to filter out unpublished, draft, or viewless content when querying the Relation entity. Because the Relation resource is configured with public read access (PUBLIC_ACCESS) via API Platform REST and GraphQL endpoints, unauthenticated remote attackers can enumerate relationship graphs, entity identifiers, and metadata associated with private content.

Alon Barad
Alon Barad
2 views•9 min read
•about 3 hours ago•CVE-2026-77380
5.2

CVE-2026-77380: Server-Side Request Forgery via Unchecked Redirects in Bolt CMS

Bolt CMS prior to version 6.1.5 is vulnerable to Server-Side Request Forgery (SSRF) in its asynchronous URL upload and media embed endpoints. While the application validates the initial user-supplied URL against internal network ranges using UrlSafetyChecker, the underlying HTTP transport libraries automatically follow HTTP 3xx redirects and HTML meta refresh directives without re-validating the target destinations. An authenticated user with editor privileges can exploit this discrepancy via an open redirector or DNS rebinding to access internal network resources and cloud metadata services.

Alon Barad
Alon Barad
4 views•10 min read
•about 4 hours ago•CVE-2026-77378
6.5

CVE-2026-77378: Authenticated SQL Injection in Bolt CMS ListFormatHelper

CVE-2026-77378 (GHSA-r7h9-qx4h-77j5) is an authenticated SQL injection vulnerability affecting the bolt/core package of Bolt CMS in versions prior to 6.1.4. The flaw resides in the ListFormatHelper utility class, where content-type slugs are dynamically interpolated into raw SQL query strings via sprintf rather than bound as parameterized inputs. When the general/caching/list_format configuration directive is enabled, an authenticated user with upload privileges can exploit the /async/select-options endpoint to inject arbitrary SQL commands and query the underlying database.

Alon Barad
Alon Barad
4 views•11 min read
•about 5 hours ago•CVE-2026-77382
5.9

CVE-2026-77382: Cryptographic Precision Loss in falcon-rust Discrete-Gaussian Sampler

A cryptographic soundness defect in the discrete-Gaussian sampler of falcon-rust prior to version 0.2.0 degrades acceptance-probability precision to approximately 2^-33. By evaluating exponential approximations using 32-bit fractional fixed-point arithmetic (FixedPoint64) and left-shifting polynomial inputs by 31 bits, the implementation violates Falcon's required precision bound of 2^-40 to 2^-46, invalidating the theoretical security reduction against statistical private key leakage.

Amit Schendel
Amit Schendel
4 views•11 min read
•about 6 hours ago•CVE-2026-62955
7.2

CVE-2026-62955: Authenticated Path Traversal and Remote Code Execution via realpath() Bypass in baserCMS BcThemeFileService

CVE-2026-62955 is an authenticated path traversal vulnerability in baserCMS affecting versions 5.2.3 up to, but not including, 5.3.0. The flaw resides in the BcThemeFileService::getFullpath() method within the bc-theme-file plugin and represents an incomplete remediation of CVE-2026-30940. Because the path containment check relies on PHP's realpath() returning a non-false value, supplying a nonexistent theme subdirectory causes the verification guard to be skipped entirely. An authenticated administrator can exploit this flaw to read, write, overwrite, or delete arbitrary files within the permissions of the PHP process, leading to remote code execution when executable PHP files are written to the webroot.

Amit Schendel
Amit Schendel
6 views•11 min read