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.
OpenCVE Enrichment