Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-69084

CVE-2026-69084: SiYuan SQL Injection Vulnerability

CVE-2026-69084 is an SQL injection vulnerability in SiYuan that allows attackers to read and modify notebook content via the /api/search/searchEmbedBlock endpoint. This article covers the technical details, affected versions, and mitigation.

Published:

CVE-2026-69084 Overview

CVE-2026-69084 is a SQL injection vulnerability in SiYuan, a self-hosted personal knowledge management application. Versions at or below v3.7.2 expose the /api/search/searchEmbedBlock endpoint, which forwards client-supplied SQL directly to the primary read-write siyuan.db handle. The endpoint enforces no single-statement, read-only, or admin restrictions. Because the underlying driver supports stacked statements, attackers can both read and modify content across every open cleartext notebook. The endpoint is gated only by CheckAuth, allowing access via the publish RoleReader token or anonymously when publish authentication is disabled. The issue is fixed in v3.7.3.

Critical Impact

Unauthenticated or low-privileged attackers can read and tamper with all cleartext notebook data via arbitrary SQL execution.

Affected Products

  • SiYuan versions <= v3.7.2
  • SiYuan instances with publish authentication disabled (anonymous exposure)
  • SiYuan instances issuing publish RoleReader tokens

Discovery Timeline

  • 2026-08-03 - CVE-2026-69084 published to the National Vulnerability Database (NVD)
  • 2026-08-03 - Last updated in NVD database

Technical Details for CVE-2026-69084

Vulnerability Analysis

The defect resides in the /api/search/searchEmbedBlock handler. SiYuan accepts a raw SQL string from the request body and executes it against the same read-write SQLite handle used by the application core. No parser or allowlist restricts the statement type, so INSERT, UPDATE, DELETE, and ATTACH operations are permitted alongside SELECT. The underlying driver executes stacked statements, meaning a single request can chain multiple queries separated by semicolons. Encrypted per-box notebooks remain protected because their contents are not held in the shared cleartext store, but all other notebooks are fully exposed [CWE-89].

Root Cause

The root cause is the absence of input validation and privilege separation on the embed-block search API. The endpoint treats the client SQL string as a trusted query rather than untrusted input. There is no dedicated read-only database connection for search operations, and no server-side parser rejects data-modifying keywords or multi-statement payloads.

Attack Vector

An attacker sends an HTTP POST request to /api/search/searchEmbedBlock containing a crafted SQL payload in the stmt field. Because authorization stops at CheckAuth, the request succeeds when submitted with a publish RoleReader token or with no credentials at all if publish authentication is disabled. The attacker can exfiltrate note contents through SELECT payloads or corrupt data with stacked UPDATE or DELETE statements against tables such as blocks, spans, and attributes.

No verified proof-of-concept code is published. See the GitHub Security Advisory and the VulnCheck SQL Injection Advisory for the vendor technical description.

Detection Methods for CVE-2026-69084

Indicators of Compromise

  • HTTP POST requests to /api/search/searchEmbedBlock containing SQL keywords such as INSERT, UPDATE, DELETE, ATTACH, or PRAGMA in the stmt field.
  • Requests to /api/search/searchEmbedBlock bearing publish RoleReader tokens or no Authorization header when publish auth is disabled.
  • Semicolon-separated stacked SQL payloads submitted to any /api/search/* endpoint.

Detection Strategies

  • Inspect reverse-proxy or web access logs for high-volume or anomalous access to /api/search/searchEmbedBlock.
  • Alert on searchEmbedBlock payloads containing statement terminators followed by additional SQL verbs.
  • Correlate SiYuan process file writes to siyuan.db with inbound requests to the search API to spot unexpected write activity.

Monitoring Recommendations

  • Enable SiYuan verbose request logging and forward it to a centralized log store for retention and query.
  • Baseline normal stmt payloads issued by legitimate clients and flag deviations in length, keywords, or structure.
  • Monitor for unauthenticated 200 OK responses on /api/search/searchEmbedBlock as evidence that publish authentication is disabled.

How to Mitigate CVE-2026-69084

Immediate Actions Required

  • Upgrade SiYuan to v3.7.3 or later, which contains the vendor patch.
  • Enable publish authentication and rotate any previously issued publish RoleReader tokens.
  • Restrict network exposure of the SiYuan kernel port to trusted clients using firewall or reverse-proxy rules.

Patch Information

The vendor released a fix in SiYuan v3.7.3. Details are documented in the GitHub Security Advisory GHSA-vh22-h7hf-www7. Upgrading is the only complete remediation.

Workarounds

  • Block external access to /api/search/searchEmbedBlock at a reverse proxy until the upgrade is applied.
  • Require strong publish authentication and disable anonymous publish access on the SiYuan kernel.
  • Store sensitive notes in encrypted per-box notebooks, which are excluded from the vulnerable code path.
bash
# Example nginx block to deny the vulnerable endpoint pre-upgrade
location = /api/search/searchEmbedBlock {
    deny all;
    return 403;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.