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

CVE-2026-69083: Unauthenticated SQL Injection and SQL Command Execution in SiYuan Full-Text Search API

Alon Barad
Alon Barad
Software Engineer

Sep 4, 2026·6 min read·34 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can execute arbitrary SQL commands on SiYuan's SQLite database via the full-text search endpoint, resulting in complete exposure or modification of indexed documents and application metadata.

An unauthenticated SQL injection and SQL execution vulnerability in SiYuan allows remote attackers to compromise the integrity and confidentiality of the asset database. The flaw exists due to string concatenation in regular expression searches and a complete lack of authorization checks on raw SQL querying pathways under default configurations. Attackers can leverage this vulnerability to exfiltrate database contents, manipulate index records, or access cross-notebook contents without any valid credentials.

Vulnerability Overview

SiYuan is a local-first personal knowledge management platform written in Go. Under typical deployments, it opens an HTTP API to coordinate search requests, asset indexing, and remote document synchronization. The vulnerability is located in the backend application handler responsible for full-text search processes, specifically routed to the endpoint path /api/search/fullTextSearchAssetContent. This endpoint constitutes a major attack surface because it is accessible to unauthenticated remote callers by default.

Under default configuration states where the variable Conf.AccessAuthCode is not defined or is left blank, the application architecture automatically elevates all external requests to the privilege level of an administrator. This architecture allows unauthenticated remote actors on accessible networks to interact directly with the underlying SQLite database engine. Because the database handle operates with read-write privileges, the vulnerability class corresponds to improper neutralization of special elements in an SQL command (CWE-89).

Root Cause Analysis

A deep technical analysis of the application codebase reveals two distinct software flaws operating inside the asset search API module. In the case of method 3 (regular expression searches), incoming parameters are processed through the controller function fullTextSearchAssetContentByRegexp within kernel/model/asset_content.go. This module generates dynamic SQL queries by interpolating user-supplied search parameters directly into a string literal pattern.

The dynamic construction is managed by the helper function assetContentFieldRegexp which appends raw user input without applying character escaping or escaping quote characters. A single quote character within the query input successfully escapes the string boundary within the REGEXP SQL condition, allowing arbitrary command insertion. This is a classic implementation error where raw user input is treated as executable code by the database parser.

In the case of method 2 (raw SQL search mode), the application passes the request payload directly to searchAssetContentBySQL. This controller function passes the entire query string straight to the raw database executor without invoking authorization checks or command validation logic. Unlike neighboring endpoints designed for similar metadata indexing tasks, this function entirely omitted access control validation, allowing any caller to execute any SQLite command string directly.

Code Analysis

Analyzing the codebase prior to the 3.7.3 release highlights the vulnerable code path in kernel/model/asset_content.go. The following snippet illustrates how the unsafe regular expression string was constructed:

// Vulnerable string construction in method 3
func assetContentFieldRegexp(exp string) string {
	buf := bytes.Buffer{}
	buf.WriteString("(name REGEXP '")
	buf.WriteString(exp)
	buf.WriteString("' OR content REGEXP '")
	buf.WriteString(exp)
	buf.WriteString("')")
	return buf.String()
}

The resulting string from assetContentFieldRegexp is directly interpolated into the parent SQL query template:

stmt := "SELECT * FROM `asset_contents_fts_case_insensitive` WHERE " + fieldFilter + " AND ext IN " + typeFilter

In the patched codebase (commit cf42dd5680c8f2d50cebfada5d639c8d59faf50e), the dynamic string concatenation was replaced entirely by safe parameter-binding APIs. The patch isolates variables from the executable statement structure:

// Patched parameterized structure
func assetContentFieldRegexp(exp string) (clause string, args []any) {
	clause = "(name REGEXP ? OR content REGEXP ?)"
	args = []any{exp, exp}
	return
}

Additionally, the patch introduced an authorization validation step within kernel/api/search.go to block non-administrator access to the raw SQL querying path (method 2):

if method == 2 && !model.IsAdminRoleContext(c) {
	ret.Code = -1
	ret.Msg = "SQL search requires administrator privileges"
	return
}

Exploitation Methodology

An attack begins by probing the target endpoint to verify if authentication requirements are absent on port 6806. Once confirmed, the attacker can submit a crafted HTTP POST request to the target path /api/search/fullTextSearchAssetContent containing a payload designed to target method 3. By inserting a single quote, trailing commands, and an inline comment characters sequence, the attacker manipulates the parser logic.

A sample JSON exploit payload targeting the REGEXP engine is constructed as follows:

{
  "query": "xyz') OR 1=1 -- ",
  "types": {},
  "method": 3,
  "orderBy": 0,
  "page": 1,
  "pageSize": 64
}

When processed by the database backend, the query is parsed as SELECT * FROM asset_contents_fts_case_insensitive WHERE (name REGEXP 'xyz') OR 1=1 -- .... The trailing comment characters sequence -- instructs the SQLite compiler to drop all subsequent filter assertions. This returns every record stored inside the full-text search asset database table directly within the response payload. Alternatively, attackers can send direct SQL commands using method 2 payloads to alter system metadata or query indexed records.

Impact Assessment

The security implications of CVE-2026-69083 are critical. An unauthorized attacker can read all indexed notebooks, text segments, synchronization logs, and document assets. The confidentiality of all data assets managed within the application is compromised.

In addition, because the database handler operates with read-write capabilities on SQLite, an attacker can modify index files or delete stored assets, disrupting indexing integrity. Since SQLite features the capability to attach external storage structures via advanced query syntax (e.g., ATTACH DATABASE), there is a risk that attackers can execute arbitrary code on the hosting environment if specific filesystem write permissions are present.

This vulnerability is particularly severe because the application is designed to store personal knowledge assets, which frequently include sensitive elements such as system credentials, network topology descriptions, and personal identifying information. The CVSS vector reflects a critical impact across confidentiality and integrity vectors.

Mitigation & Remediation

Remediation requires upgrading the SiYuan application to version 3.7.3 or later. This update enforces parameterized data input across search controllers and adds mandatory validation checks on administrative endpoints.

For instances where immediate updates are not possible, administrators must configure a non-empty administrative access authentication key. Specifying the Conf.AccessAuthCode parameter in the environment configuration enforces authentication, preventing unauthenticated callers from obtaining automatic administrative privileges.

To detect and block exploit attempts at the perimeter, network security operators can deploy custom Web Application Firewall (WAF) filters. Rules should target incoming POST requests directed to /api/search/fullTextSearchAssetContent and flag payloads that contain single quotes or comments within the search string while method parameters are set to 2 or 3.

Official Patches

siyuan-noteOfficial patch commit implementing parameterized queries and authorization checks

Fix Analysis (1)

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
EPSS Probability
0.35%
Top 72% most exploited

Affected Systems

SiYuan Personal Knowledge Management System

Affected Versions Detail

Product
Affected Versions
Fixed Version
SiYuan
siyuan-note
< 3.7.33.7.3
AttributeDetail
CWE IDCWE-89
Attack VectorNetwork (AV:N)
CVSS Score10.0 (Critical)
EPSS Score0.0035 (27.97th percentile)
Exploit StatusFunctional PoC Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1114Email/Document Collection
Credential Access
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The software constructs an SQL command using input from an upstream component, but does not neutralize or incorrectly neutralizes special elements that can modify the SQL command.

Known Exploits & Detection

GitHubFunctional proof-of-concept Python script to exfiltrate SQLite indexed asset database records

Vulnerability Timeline

Official security patch committed to SiYuan codebase
2026-07-21
GitHub Security Advisory GHSA-fph3-ghq9-vw66 published
2026-08-03
Functional python exploit script released publicly by security researcher
2026-08-03

References & Sources

  • [1]GitHub Security Advisory GHSA-fph3-ghq9-vw66
  • [2]Functional Proof-of-Concept Exploit on GitHub
  • [3]VulnCheck Vulnerability Advisory

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

•1 day ago•CVE-2026-107844
5.3

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Amit Schendel
Amit Schendel
8 views•5 min read
•1 day ago•CVE-2026-107848
3.5

CVE-2026-107848: Cross-Site Request Forgery (CSRF) in Contao Backend Actions via GET Requests

Contao Open Source CMS versions 4.0.0 through 5.3.49 and 5.4.0-RC1 through 5.7.11 contain a Cross-Site Request Forgery (CSRF) vulnerability in backend parameter handling. The `RequestTokenListener` component validates anti-CSRF tokens solely for HTTP POST requests, while GET-based declarative guards run only when an `act` parameter is present in the query string. Consequently, custom backend actions dispatched via alternative parameters such as `key=` can execute without CSRF token verification when triggered by an authenticated user.

Amit Schendel
Amit Schendel
7 views•5 min read
•1 day ago•CVE-2026-107843
5.3

CVE-2026-107843: Unthrottled Activation Email Resend and Account Enumeration in Contao CMS

Contao CMS versions 4.1.0 through 5.3.49 and 5.4.0-RC1 through 5.7.11 fail to validate form submission tokens and enforce rate limiting when processing activation email resend requests via HTTP POST, enabling resource exhaustion and account state enumeration.

Amit Schendel
Amit Schendel
8 views•4 min read
•1 day ago•CVE-2026-107842
5.3

CVE-2026-107842: Information Disclosure via Stale Indexing in Contao Search Module

An information disclosure vulnerability in Contao CMS allows unauthenticated site visitors to view protected page titles, URLs, and text excerpts through search queries when protected page indexing is disabled after previously being enabled.

Amit Schendel
Amit Schendel
10 views•4 min read
•1 day ago•GHSA-G38J-7V97-X298
6.5

GHSA-G38J-7V97-X298: Missing Authorization Check in Vikunja CalDAV Task Relation Creation

In Vikunja prior to version 2.6.0, relation creation via the CalDAV endpoint fails to invoke the TaskRelation.CanCreate authorization check. This missing access control allows an authenticated user to establish unauthorized relationships and perform write operations against any task, provided its unique identifier (UID) is known.

Alon Barad
Alon Barad
12 views•5 min read
•1 day ago•GHSA-3HC7-R24J-RPWC
6.8

GHSA-3hc7-r24j-rpwc: Cross-Project Task Disclosure via Subtask Expansion in Vikunja

A cross-project information disclosure vulnerability in Vikunja allows authenticated users with read access to one project to view private task details from unauthorized projects via subtask expansion parameters.

Alon Barad
Alon Barad
9 views•5 min read