CVE-2026-69085

SiYuan before v3.7.3 SQL Injection via searchDocs

Published Aug 3, 2026 CVSS 4.0 · 9.9 Critical EPSS 1.4% KEV · Not listed
Description
SiYuan before v3.7.3 contains a SQL injection vulnerability in the /api/filetree/searchDocs endpoint, where the caller-supplied keyword parameter is concatenated directly into SQL statements with no escaping or parameter binding. The endpoint is reachable by a publish RoleReader token, or unauthenticated when publish mode is enabled with Publish.Auth.Enable set to false. Because the statement executes on a read-write SQLite handle via a driver that supports stacked (semicolon-separated) statements, an attacker can read and modify database content across all cleartext (non-encrypted) notebooks on the instance.

Analysis

AI-generated

Technical impact

SiYuan applications prior to version 3.7.3 contain a SQL injection flaw in the /api/filetree/searchDocs endpoint. The keyword query parameter is concatenated into a SQL statement without escaping or parameter binding. The resulting query is executed using a read‑write SQLite handle that supports stacked, semicolon‑separated statements, thereby allowing an attacker to inject arbitrary SQL that can read from, modify, or delete data in the database. The vulnerability can lead to unauthorized disclosure of private notes and potentially alter or delete user content.

Affected Systems

All deployments of SiYuan older than 3.7.3 are affected. The endpoint is reachable when the application operates in publish mode, or when the publish RoleReader token is present. Even if publish mode is disabled, unauthenticated access is possible if Publish.Auth.Enable is set to false, exposing the same attack surface.

Risk and Exploitability

The CVSS score of 9.9 reflects a high‑severity flaw with complete external exploitability. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. An attacker can launch the exploit from any network location that can reach the exposed API, using a valid or unauthenticated request. The attack requires only the ability to send the keyword parameter, making the necessary conditions trivial for an attacker in scope. If successfully exploited, it grants read and write access to all cleartext notebooks on the instance.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SiYuan to version 3.7.3 or later, which removes the unescaped string concatenation from the searchDocs endpoint
  • If an upgrade is not immediately possible, restrict or disable the /api/filetree/searchDocs endpoint by turning off publish mode or by ensuring that publish RoleReader tokens are not issued; alternatively, block the endpoint with a firewall or reverse proxy
  • Configure the application so that Publish.Auth.Enable is set to true, thereby requiring authenticated users to access the API, and restrict access to RoleAdmin only if feasible

Generated by OpenCVE AI on August 4, 2026 at 10:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-33jq-p8c2-q3q4 SiYuan: Unauthenticated SQL injection in searchDocs via unescaped keyword (publish mode): cross-notebook read/write with statement stacking
History
Type Values Removed Values Added
First Time appeared B3log
B3log siyuan
CPEs cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*
Vendors & Products B3log
B3log siyuan
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Siyuan
Siyuan siyuan
Vendors & Products Siyuan
Siyuan siyuan
Type Values Removed Values Added
Description SiYuan before v3.7.3 contains a SQL injection vulnerability in the /api/filetree/searchDocs endpoint, where the caller-supplied keyword parameter is concatenated directly into SQL statements with no escaping or parameter binding. The endpoint is reachable by a publish RoleReader token, or unauthenticated when publish mode is enabled with Publish.Auth.Enable set to false. Because the statement executes on a read-write SQLite handle via a driver that supports stacked (semicolon-separated) statements, an attacker can read and modify database content across all cleartext (non-encrypted) notebooks on the instance.
Title SiYuan before v3.7.3 SQL Injection via searchDocs
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N'}

cvssV4_0

{'score': 9.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N'}

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 14, 2026, 4:51 PM
Reserved
Aug 3, 2026, 10:42 AM
Status
Deferred
Published
Aug 3, 2026, 2:16 PM
Modified
Oct 23, 2026, 9:10 PM