External risk intelligence

SiYuan SQL Injection Allows Database Read and Modification

CVE advisorySeverity: CRITICAL (CVSS 9.9)

CVE-2026-69085

The vulnerability exists in an API endpoint (/api/filetree/searchDocs) that is designed to be reachable without authentication when the application's publish mode is enabled, making it a public-facing service by design.

SQL Injection

Halo Surface Signal: 5 out of 5 — more likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A vulnerability in SiYuan's search functionality could allow an attacker to access and modify sensitive data within non-encrypted notebooks if the system is configured with specific publishing settings. This issue impacts the integrity and confidentiality of stored information.

  • Attackers can alter or steal data from notebooks.
  • Confidentiality and integrity of data are at risk.
  • Confirm exposure and impact on your data.

Attack Path

How an attacker could exploit the issue

An attacker can target the searchDocs API endpoint, which is exposed externally and accessible either anonymously or with limited privileges. By sending a specially crafted keyword to this endpoint, an attacker can inject malicious SQL commands. This can lead to unauthorized access and modification of data stored in all non-encrypted notebooks within the SiYuan instance.

  • Unauthenticated or limited user access.
  • Keyword parameter in API call.
  • Read and modify database content.

Live Threat

Current exploitation, exposure, and threat context

This vulnerability could affect all cleartext notebooks on an instance when an attacker can access the `/api/filetree/searchDocs` endpoint. This endpoint is reachable unauthenticated when publish mode is enabled with specific configurations, or with a publish RoleReader token, allowing the attacker to execute SQL statements.

  • Database content on all notebooks at risk.
  • Direct SQL injection via API endpoint.
  • Read and modify all cleartext notebook data.

Operational Fix

Recommended remediation, mitigation, and detection steps

The SQL injection vulnerability in the searchDocs endpoint affects SiYuan instances, potentially impacting data integrity and confidentiality. Owners of the SiYuan application, along with infrastructure and security teams, are likely responsible for addressing this. The first practical step is to identify all SiYuan instances, determine their exposure and business criticality, and then plan remediation.

  • Identify SiYuan instances and accountable owners.
  • Verify instance reachability and business criticality.
  • Plan remediation based on identified risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is SiYuan and what is it used for?

SiYuan is a privacy-first, locally-first personal knowledge management software. It allows users to create, organize, and store notes and documents in Markdown format. Users typically use it to build a digital brain or repository for personal information, often syncing or publishing these notebooks for collaborative or public access.

How does this SQL injection affect SiYuan?

This vulnerability is a SQL injection flaw (CWE-89) in the search functionality. Because the software fails to properly sanitize user input before passing it to the database, an attacker can manipulate SQL queries. This allows them to execute unauthorized commands to read or modify the content of any non-encrypted notebooks stored within the SiYuan database.

When can an attacker trigger this vulnerability?

An attacker can trigger this by sending a crafted keyword parameter to the /api/filetree/searchDocs endpoint. The bug is reachable if the instance uses a publish RoleReader token or has public publishing enabled with authentication disabled. It does not trigger if the instance is strictly private, lacks publish features, or is fully encrypted, as the database operations target cleartext storage.

Is my instance at risk according to Halo Surface Signal?

Halo Surface Signal indicates that because this vulnerability exists in an API endpoint designed to be reachable without authentication, it is highly likely to be accessible to external parties. If your SiYuan instance has publish mode enabled, the API is public-facing by design, making it a critical point of interest for unauthorized access.

What should I do if I run SiYuan?

First, locate all running instances of SiYuan in your environment and identify who is responsible for them. Check your configuration settings to see if public publishing is enabled or if access tokens are in use. Prioritize updating the software to version 3.7.3 or later, which resolves the flaw, and ensure all instances are secured according to the latest vendor security guidance.

References