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

CVE-2026-100644: SiYuan SQL Injection Vulnerability

CVE-2026-100644 is a SQL injection flaw in SiYuan that allows unauthenticated attackers to extract database rows through the graph query endpoint. This post covers the technical details, affected versions, and mitigation steps.

Published:

CVE-2026-100644 Overview

CVE-2026-100644 is a SQL injection vulnerability in SiYuan, an open-source personal knowledge management application, affecting all versions before v3.8.4. The flaw resides in the graph query endpoint, where the dailyNoteSavePath parameter is concatenated into a SQL statement without proper escaping or parameterization. Unauthenticated attackers can exploit the issue against published SiYuan sites that have authentication disabled. By injecting a UNION SELECT payload, an attacker can extract arbitrary rows from the underlying database across all notebooks hosted by the instance. The vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

Critical Impact

Unauthenticated remote attackers can exfiltrate the contents of every notebook stored in a vulnerable SiYuan instance by injecting SQL through the dailyNoteSavePath parameter.

Affected Products

  • SiYuan note-taking application, all versions prior to v3.8.4
  • Published SiYuan sites with authentication disabled (unauthenticated exploitation path)
  • SiYuan instances exposing the graph query endpoint over the network

Discovery Timeline

  • 2026-09-26 - CVE-2026-100644 published to the National Vulnerability Database
  • 2026-09-28 - Last updated in NVD database

Technical Details for CVE-2026-100644

Vulnerability Analysis

SiYuan exposes a graph query endpoint used to render relationship views between daily notes and other content. The handler accepts a dailyNoteSavePath parameter supplied by the client. Instead of binding this value as a prepared statement parameter, the server concatenates it directly into a SQL query string executed against the local SQLite database.

Because the concatenation occurs without escaping or type validation, an attacker controls part of the SQL syntax. Supplying crafted input terminates the intended clause and appends attacker-defined SQL. The database executes the composite statement with the same privileges as the SiYuan process, which has full access to every notebook stored in the instance.

The exposure is amplified on published SiYuan sites that have authentication disabled. In that configuration, the vulnerable endpoint is reachable without credentials, allowing anonymous network attackers to run arbitrary read queries against the backing database.

Root Cause

The root cause is improper neutralization of special elements in a SQL command [CWE-89]. The server-side handler for the graph query treats the dailyNoteSavePath value as trusted string data and interpolates it into the SQL statement. No allow-list, escaping routine, or parameterized query API is applied before execution.

Attack Vector

An attacker sends an HTTP request to the graph query endpoint of an exposed SiYuan instance with a malicious dailyNoteSavePath value. The payload closes the original SQL clause and appends a UNION SELECT that targets other tables containing notebook content, block data, or metadata. The database returns the attacker-controlled rows in the response, enabling dump-style exfiltration across all notebooks on the instance. The attack requires no authentication, no user interaction, and only network reachability to the vulnerable endpoint. No verified public exploit code is available at this time; see the GitHub Security Advisory GHSA-xr4h-j7cg-q8pc and the VulnCheck SQL Injection Advisory for the technical write-up.

Detection Methods for CVE-2026-100644

Indicators of Compromise

  • HTTP requests to the SiYuan graph query endpoint containing SQL keywords such as UNION, SELECT, --, or /* within the dailyNoteSavePath parameter.
  • Unusually large response bodies from the graph query endpoint that return rows unrelated to the requesting user's notebook context.
  • Access to the SiYuan API from unauthenticated or unexpected source IP addresses on instances configured as published sites.

Detection Strategies

  • Deploy web application firewall or reverse-proxy rules that inspect the dailyNoteSavePath parameter for SQL metacharacters and common injection tokens.
  • Enable verbose request logging on the SiYuan process and alert on query strings containing SQL syntax within path-like parameters.
  • Correlate graph query endpoint traffic with authentication state; flag any successful requests on published sites where authentication is disabled.

Monitoring Recommendations

  • Monitor outbound data volume from SiYuan hosts for sudden spikes that could indicate bulk extraction of notebook data.
  • Track process-level file and database access on SiYuan servers to detect anomalous read patterns against the underlying SQLite file.
  • Review access logs for repeated requests to the graph query endpoint from a single source within a short window, which is characteristic of iterative SQL injection enumeration.

How to Mitigate CVE-2026-100644

Immediate Actions Required

  • Upgrade all SiYuan deployments to v3.8.4 or later, which contains the fix for the dailyNoteSavePath injection.
  • Re-enable authentication on any published SiYuan sites until the upgrade is verified in production.
  • Restrict network access to the SiYuan service so that only trusted clients can reach the graph query endpoint.

Patch Information

The maintainers addressed the vulnerability in SiYuan v3.8.4. The fix replaces the vulnerable string concatenation with safe parameter handling for dailyNoteSavePath. Refer to the GitHub Security Advisory GHSA-xr4h-j7cg-q8pc for the authoritative patch notes and the VulnCheck SQL Injection Advisory for additional context.

Workarounds

  • Enable authentication on all published SiYuan sites to remove the unauthenticated exploitation path.
  • Place the SiYuan instance behind a reverse proxy or VPN and block direct internet exposure of the API.
  • Deploy WAF rules that reject requests to the graph query endpoint whose dailyNoteSavePath value contains characters outside the expected path character set.
bash
# Example reverse-proxy rule concept: reject SQL metacharacters in dailyNoteSavePath
# nginx snippet (illustrative)
if ($arg_dailyNoteSavePath ~* "(union|select|--|/\*|;)") {
    return 403;
}

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

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.