Monitor vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
9.8

SiYuan Allows Authorized Users to Execute Arbitrary SQL Statements

GHSA-j7wh-x834-p3r7 CVE-2026-32767
Summary

A security issue in SiYuan version 3.6.0 and earlier allows users with a certain role to execute any SQL command, potentially deleting or modifying data. This bypasses the intended security settings. To fix this, update to a recent version of SiYuan or apply a patch to restrict the search API to authorized roles.

What to do

No fix is available yet. Check with your software vendor for updates.

Affected software
VendorProductAffected versionsFix available
github.com siyuan-note <= 0.0.0-20260313024916-fd6526133bb3
Original title
SiYuan is a personal knowledge management system. Versions 3.6.0 and below contain an authorization bypass vulnerability in the /api/search/fullTextSearchBlock endpoint. When the method parameter i...
Original description
SiYuan is a personal knowledge management system. Versions 3.6.0 and below contain an authorization bypass vulnerability in the /api/search/fullTextSearchBlock endpoint. When the method parameter is set to 2, the endpoint passes user-supplied input directly as a raw SQL statement to the underlying SQLite database without any authorization or read-only checks. This allows any authenticated user — including those with the Reader role — to execute arbitrary SQL statements (SELECT, DELETE, UPDATE, DROP TABLE, etc.) against the application's database. This is inconsistent with the application's own security model: the dedicated SQL endpoint (/api/query/sql) correctly requires both CheckAdminRole and CheckReadonly middleware, but the search endpoint bypasses these controls entirely. This issue has been fixed in version 3.6.1.
ghsa CVSS3.1 9.8
Vulnerability type
CWE-89 SQL Injection
CWE-863 Incorrect Authorization
Published: 20 Mar 2026 · Updated: 20 Mar 2026 · First seen: 16 Mar 2026