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

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 11, 2026·5 min read·39 visits

Executive Summary (TL;DR)

An unauthenticated API endpoint in SiYuan PKM before 3.7.0 evaluates user-controlled input using the Go template engine. Remote attackers can leverage registered SQL helper functions to query the underlying SQLite database and exfiltrate notes, credentials, and system metadata.

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Vulnerability Overview

The SiYuan personal knowledge management system utilizes a client-server architecture where a Go-based backend (referred to as the kernel) processes internal system tasks and serves API requests. The core application exposes multiple endpoints to manipulate blocks, render views, and serve asset files. Among these endpoints, several are exposed publicly to handle system bootstrap processes and generate transient resources without requiring session validation.\n\nPrior to version 3.7.0, the API endpoint /api/icon/getDynamicIcon was designated as an unauthenticated route in the router configuration. This endpoint is responsible for rendering user-customized SVG files based on specified icon configurations and text formats. Because it lacked session validation, any remote network client with connectivity to the application interface could access this endpoint directly.\n\nThe unauthenticated status of this handler combined with the dynamic template processing logic exposes a significant attack surface. Unauthenticated users are permitted to supply structured query parameters that directly trigger internal compilation components. The subsequent sections explore how this lack of access control allows remote actors to invoke privileged system database actions.

Root Cause Analysis

The underlying flaw stems from the implementation of type 8 (text-based) icon generation in the backend handler. When the query parameter type is set to 8, the endpoint routes control to the generateTypeEightSVG function inside kernel/api/icon.go. This function checks the incoming request parameter content to verify if it contains the string token .action{.\n\nWhen this specific token is detected, the application transfers execution to RenderDynamicIconContentTemplate within the kernel/model/template.go file. This function initializes a Go text/template compilation engine utilizing .action{ and } as the template action delimiters. It maps a set of built-in file system and data access routines directly into the active compilation scope.\n\nThe crucial error is the registration of SQLite database queries in this template engine. The template initialization logic merges internal SQL query helper functions, specifically querySQL and queryBlocks, into the template's executive execution environment. Because the backend does not validate or clean the user-supplied string before parsing, Go compiles and executes the template's functional statements, which includes running any embedded database queries.

Code Analysis

The vulnerability resides in the router registration block in kernel/api/router.go. In affected versions, the API handlers are divided into authenticated and unauthenticated sections. The /api/icon/getDynamicIcon route was grouped with standard unauthenticated endpoints such as the boot progress tracker.\n\ngo\n// Affected Router Registration (kernel/api/router.go)\nginServer.Handle("GET", "/api/icon/getDynamicIcon", getDynamicIcon)\n\n\nThe corresponding patch alters this registration by enforcing the model.CheckAuth middleware. This ensures that any incoming request validates session identifiers before reaching the handler.\n\ngo\n// Patched Router Registration (kernel/api/router.go)\nginServer.Handle("GET", "/api/icon/getDynamicIcon", model.CheckAuth, getDynamicIcon)\n\n\nmermaid\ngraph LR\n Client["Client Request"] --> Router["router.go"]\n Router -- "Unauthenticated (Vulnerable)" --> Handler["getDynamicIcon"]\n Router -- "Authenticated (Patched)" --> Middleware["model.CheckAuth"]\n Middleware -- "Valid Session" --> Handler\n Middleware -- "Invalid Session" --> Denied["401 Unauthorized"]\n Handler --> Template["Template Evaluation"]\n Template --> SQL["SQLite execution via querySQL"]\n

Exploitation Methodology

To exploit this vulnerability, an attacker must craft an HTTP request containing a valid database template statement. The primary prerequisite is discovering a valid block identifier (ID) within the database. Because SiYuan uses block-level notes, block IDs are routinely leaked through shared links, configuration files, or public document structures.\n\nAfter obtaining a valid block ID, the attacker targets the /api/icon/getDynamicIcon endpoint. The attacker sets the type parameter to 8 and the id parameter to the discovered block ID. The critical payload is passed via the content parameter, utilizing the custom template delimiter .action{ followed by the database execution function.\n\nAn example request payload targets the internal database to exfiltrate table contents. By supplying .action{querySQL "SELECT content FROM blocks LIMIT 1"}, the application executes the query against the SQLite backend. The returned string result is placed inside the <text> element of the resulting SVG payload, transferring the confidential data within the image structure to the unauthenticated requester.

Impact Assessment

The security impact is marked as a high confidentiality threat. The SQLite database contains the entirety of the user's workspace, including note content, system configurations, credential blocks, and synchronization metadata. Unauthenticated access allows complete extraction of this database without triggering endpoint logs associated with typical administrative functions.\n\nBecause the action does not modify the underlying database, the integrity and availability impacts are classified as none. The exploit complexity is rated as high because the attacker must first acquire or guess a valid block ID to satisfy the node retrieval check inside RenderDynamicIconContentTemplate. This requirement prevents automated blind scanning from immediately retrieving data unless standard default block configurations are present.\n\nThe vulnerability is tracked under CVE-2026-54068 and GHSA-gcm7-57gf-953c. The CVSS base score of 5.9 reflects the remote capability to read highly sensitive local system data offset by the complexity required to target specific instance files.

Remediation & Detection Guidance

Addressing this issue requires updating the SiYuan application deployment to version 3.7.0 or newer. This update migrates the dynamic icon endpoint behind the core authentication layer. If immediate updates are not possible, administrators should use system firewalls or reverse proxy rules to drop external requests targeting /api/icon/getDynamicIcon.\n\nTo identify vulnerable servers, security teams can execute testing queries that do not require valid block IDs. Sending a GET request to the target dynamic icon endpoint with type 8 will elicit a specific behavior. If the server responds with an HTTP 200 and an SVG image content type, the system is lacking authentication checks and remains vulnerable.\n\nConversely, a secure instance will return a 401 Unauthorized status or redirect the client to the login page. Continuous monitoring of web application logs for unusual queries targeting the dynamic icon URL path helps identify potential reconnaissance and targeted exploitation attempts.

Official Patches

siyuan-noteCore routing fix enforcing authentication

Fix Analysis (1)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Probability
0.24%
Top 85% most exploited

Affected Systems

SiYuan Open-Source Personal Knowledge Management System

Affected Versions Detail

Product
Affected Versions
Fixed Version
siyuan
siyuan-note
< 3.7.03.7.0
AttributeDetail
CWE IDCWE-306
Attack VectorNetwork (AV:N)
CVSS Score5.9 (Medium)
EPSS Score0.00239 (Percentile Rank: 14.92%)
ImpactHigh Confidentiality Leakage
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-306
Missing Authentication for Critical Function

The product does not perform any authentication for a functionality that requires a proven user identity or is restricted to a specified set of identities.

References & Sources

  • [1]GitHub Security Advisory GHSA-gcm7-57gf-953c

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

•about 16 hours ago•CVE-2026-9318
5.4

CVE-2026-9318: Stored Cross-Site Scripting via HTML Export in Jazzband tablib

CVE-2026-9318 is a stored cross-site scripting (XSS) vulnerability affecting Jazzband tablib versions prior to 3.10.0. The flaw is located in the HTML export functionality of multi-sheet Databook objects. Due to raw f-string interpolation, unsanitized sheet titles containing malicious script tags are rendered directly as HTML, allowing arbitrary client-side code execution in a victim's browser.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 17 hours ago•CVE-2026-54917
10.0

CVE-2026-54917: Cross-Bucket Path Traversal and Authorization Bypass in SeaweedFS S3 and Iceberg Gateways

CVE-2026-54917 is a critical path traversal and authorization bypass vulnerability affecting the S3 and Iceberg REST catalog gateways in SeaweedFS. By explicitly disabling canonical path cleaning in the gorilla/mux routing system, relative path segments such as '..' are allowed to bypass routing constraints and access control checks. When these paths are collapsed server-side by the backend filer, they resolve to folders outside the authorized bucket boundary, allowing unauthorized cross-bucket access.

Amit Schendel
Amit Schendel
6 views•5 min read
•about 18 hours ago•GHSA-JWJP-4649-V8JP
7.5

GHSA-jwjp-4649-v8jp: Out-of-Bounds Read in SIPSorcery SCTP SACK Chunk Parsing

An out-of-bounds read vulnerability in the SCTP SACK chunk parser of SIPSorcery leads to Denial of Service (DoS) or silent internal state corruption due to lack of boundary validation on incoming chunk elements.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 19 hours ago•GHSA-PFVM-W89X-94JW
7.5

GHSA-pfvm-w89x-94jw: Uncaught Exception in STUN Parser Causes Complete TurnServer Receive Loop Termination

An uncaught exception vulnerability exists in SIPSorcery's TurnServer component, where unauthenticated malformed UDP packets can crash the core UDP receive loop, resulting in a persistent Denial of Service.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•CVE-2026-62898
7.5

CVE-2026-62898: Use After Free Information Disclosure in Microsoft QUIC

A critical use-after-free vulnerability in Microsoft QUIC allows unauthenticated remote attackers to disclose sensitive system memory over the network. The vulnerability is caused by a race condition during rapid connection termination and asynchronous packet retransmission.

Alon Barad
Alon Barad
14 views•6 min read
•1 day ago•CVE-2026-62899
5.9

CVE-2026-62899: .NET Security Feature Bypass Vulnerability (HTTP Request Smuggling)

CVE-2026-62899 is a security feature bypass vulnerability in the Microsoft .NET runtime environment on non-Windows platforms. The flaw manifests as an HTTP Request/Response Smuggling vulnerability (CWE-444) within the managed implementation of the System.Net.HttpListener class. This allows unauthenticated remote attackers to desynchronize request boundaries when the backend .NET application is hosted behind an upstream reverse proxy.

Amit Schendel
Amit Schendel
16 views•6 min read