{"id":"CVE-2026-69083","revision":null,"records":[{"revision":"83388c4db6544957a42026d018e9321a","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-69083","aliases":[],"title":"SiYuan before v3.7.3 SQL Injection via fullTextSearchAssetContent","description":"SiYuan versions before v3.7.3 contain SQL injection vulnerabilities in the fullTextSearchAssetContent endpoint reachable by unauthenticated users and publish RoleReader tokens. Attackers can execute arbitrary SQL on the read-write asset-content database via unescaped method parameters and REGEXP clauses to read, modify, or delete cross-notebook data.","state":0,"publishedAt":"2026-08-03T13:20:39.264+00:00","modifiedAt":"2026-08-14T16:51:11.527+00:00","affected":[{"ecosystem":"Vendor product","name":"siyuan","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"siyuan-note\",\n                    \"product\": \"siyuan\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:golang/github.com/siyuan-note/siyuan/kernel\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"3.7.3\"\n                        },\n                        {\n                            \"version\": \"3.7.3\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N","score":9.9,"severity":"CRITICAL"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"severity":"CRITICAL"}],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-fph3-ghq9-vw66","https://www.vulncheck.com/advisories/siyuan-before-sql-injection-via-fulltextsearchassetcontent"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-69083","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-69083","identifiers":["CVE-2026-69083"]},"retained":false,"historicalAffected":[]},{"revision":"7c1c602f14f4482898a74926b5f0e3c6","observedAt":"2026-10-25T15:18:51.467+00:00","statement":{"source":"nvd","id":"CVE-2026-69083","aliases":[],"title":"SiYuan versions before v3.7.3 contain SQL injection vulnerabilities in the fullTextSearchAssetContent endpoint reachable by unauthenticated users and publish RoleReader tokens. Attackers can execute arbitrary SQL on the read-write asset-con…","description":"SiYuan versions before v3.7.3 contain SQL injection vulnerabilities in the fullTextSearchAssetContent endpoint reachable by unauthenticated users and publish RoleReader tokens. Attackers can execute arbitrary SQL on the read-write asset-content database via unescaped method parameters and REGEXP clauses to read, modify, or delete cross-notebook data.","state":0,"publishedAt":"2026-08-03T14:16:28.537+00:00","modifiedAt":"2026-10-23T21:10:00.157+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · disclosure@vulncheck.com · Secondary","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":9.9,"severity":"CRITICAL"},{"system":"CVSS 3.1 · disclosure@vulncheck.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"severity":"CRITICAL"}],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-fph3-ghq9-vw66","https://www.vulncheck.com/advisories/siyuan-before-sql-injection-via-fulltextsearchassetcontent"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-69083","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-89"],"productCriteria":[],"sourceDates":{"published":"2026-08-03T14:16:28.537","lastModified":"2026-10-23T21:10:00.157"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-69083","identifiers":["CVE-2026-69083"]},"retained":false,"historicalAffected":[]},{"revision":"7fde7d3e406b4bea8c2eaa2723634e60","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-fph3-ghq9-vw66","aliases":["CVE-2026-69083","GO-2026-6374"],"title":"SiYuan: Unauthenticated SQL execution and REGEXP injection via fullTextSearchAssetContent (publish mode): reader-reachable raw SQL (method 2) and unescaped REGEXP (method 3) on read-write asset-content DB","description":"**CVE:** This vulnerability corresponds to [CVE-2026-69083](https://nvd.nist.gov/vuln/detail/CVE-2026-69083).\n\n### Summary\n\nThe `/api/search/fullTextSearchAssetContent` endpoint exposes two SQL flaws on the asset-content database, both reachable by the publish `RoleReader` token and by the anonymous account when `Publish.Auth.Enable` is `false`:\n\n1. **method 2** passes a client-supplied SQL statement to the read-write asset-content DB with no single-statement or read-only guard, and without the admin restriction its sibling `fullTextSearchBlock` applies to the same SQL method.\n2. **method 3** builds a `REGEXP` clause by concatenating the client expression with no quote-escaping, permitting SQL breakout while the equivalent block-search builder does escape.\n\nBoth run on a read-write handle through a statement-stacking-capable driver, spanning the cross-notebook asset-content store.\n\n### Details\n\n**Route / auth tier.** `router.go`: `Handle(\"POST\", \"/api/search/fullTextSearchAssetContent\", model.CheckAuth, fullTextSearchAssetContent)`, `CheckAuth` only. Anonymous/reader reachable on the publish surface. `parseSearchAssetContentArgs` reads `method` and `query` straight from the JSON body with no constraint, so both are fully client-controlled.\n\n**Missing admin guard (contrast with the sibling).** `fullTextSearchBlock` rejects the SQL method for non-admins (`if method == 2 && !IsAdminRoleContext(c)`). `fullTextSearchAssetContent` has no such check on its handler, so the SQL method is reachable by a reader.\n\n**method 2 : raw SQL, no statement guard.** Dispatch: `FullTextSearchAssetContent` case 2 → `searchAssetContentBySQL(query, …)`. After `filterQueryInvisibleChars` + `TrimSpace`, the statement is passed to `sql.SelectAssetContentsRawStmt(stmt, …)` → `queryAssetContent` → `assetContentDB.Query(query)` directly, with no `CheckSingleStatement`/`CheckReadonlyStatement`. The `assetContentDB` DSN sets no `mode=ro`/`_query_only`, so the handle is read-write (same `88250/go-sqlite3` fork).\n\n**method 3 : unescaped REGEXP concatenation.** Dispatch → `assetContentFieldRegexp(exp)`, which writes `(name REGEXP '<exp>' OR content REGEXP '<exp>')` by concatenation with **no** `'` escaping. `exp` reaches it after only `filterQueryInvisibleChars` (strips invisible characters, not quotes). The parallel block-search builder `fieldRegexp` performs `ReplaceAll(regexp, \"'\", \"''\")` before wrapping, this asset builder omits that step. A single quote in `exp` breaks out of the literal into SQL context. The result runs via `SelectAssetContentsRawStmtNoParse` → `queryAssetContent` → direct `assetContentDB.Query`, again with no single/read-only guard.\n\n**Post-hoc filter.** `FilterAssetContentByPublishAccess` runs on the results after the query executes; it filters rows and does not constrain the statement (same timing as the accepted `searchDocs`/`searchEmbedBlock` findings).\n\n**Handle / stacking / scope.** Read-write asset-content DB, `88250/go-sqlite3` stacking-capable driver, `ATTACH` available. The asset-content store spans notebooks cross-boundary.\n\n### Impact\n\nAn unauthenticated request (publish mode with auth disabled) or any publish `RoleReader` can, via method 2, execute arbitrary SQL on the read-write asset-content database, and via method 3, inject SQL through the unescaped `REGEXP` clause. Both permit cross-notebook read disclosure of asset-content data and, via the read-write handle and statement stacking, modification of database content and `ATTACH`-reachable files. No admin role or write permission through the normal API is required. Code execution is not reachable in the default build (no `load_extension`).\n\n### PoC Steps\n\n1. Create a doc with a heading and secret body (6806, admin token)\n\n`curl -s -X POST http://127.0.0.1:6806/api/notebook/createNotebook -H \"Content-Type: application/json\" -H \"Authorization: Token g4wj3r04ntobe9m4\" -d \"{\\\"name\\\":\\\"F3\\\"}\"`\nTake the returned notebook id as BOX, then:\n`curl -s -X POST http://127.0.0.1:6806/api/filetree/createDocWithMd -H \"Content-Type: application/json\" -H \"Authorization: Token g4wj3r04ntobe9m4\" -d \"{\\\"notebook\\\":\\\"BOX\\\",\\\"path\\\":\\\"/f3-secret\\\",\\\"markdown\\\":\\\"## SecretSection\\n\\nUNIQUE_MARKER_99 hidden body text\\\"}\"`\nThe returned string is the doc root id → DOC.\n\n2. Get the heading block id (admin SQL on 68\n\n`curl -s -X POST http://127.0.0.1:6806/api/notebook/createNotebook -H \"Content-Type: application/json\" -H \"Authorization: Token g4wj3r04ntobe9m4\" -d \"{\\\"name\\\":\\\"F3\\\"}\"`\nTake the returned notebook id as BOX, then:\n`curl -s -X POST http://127.0.0.1:6806/api/fintent-Type: application/json\" -H\"Authorization: Token g4wj3r04ntobe9m4\" -d \"{\\\"notebook\\\":\\\"BOX\\\",\\\"path\\\":\\\"/f3-secret\\\",\\\"markdown\\\":\\\"## SecretSection\\n\\nUNIQUE_MARKER_99 hidden body text\\\"}\"`\nThe returned string is the doc root id → DOC.\n\n2. Get the heading block id (admin SQL on 6806)\n\n`curl -s -X POST http://127.0.0.1:6806/api/query/sql -H \"Content-Type: application/json\" -H \"Authorization: Token g4wj3r04ntobe9m4\" -d \"{\\\"stmt\\\":\\\"SELECT id,type,content FROM blocks WHERE type='h'\\\"}\"`\nCopy the id whose content is SecretSection → HEADING.\n\n3. Mark the doc forbidden from publishing (admin)\n\n`curl -s -X POST http://127.0.0.1:6806/api/filetree/setPublishAccess -H \"Content-Type: application/json\" -H \"Authorization: Token g4wj3r04ntobe9m4\" -d \"{\\\"id\\\":\\\"DOC\\\",\\\"visible\\\":false,\\\"password\\\":\\\"\\\",\\\"disable\\\":true}\"`\nNow the doc is explicitly excluded from the\n\n4. Baseline: the admin-gated sibling refuses the reader\n\n`curl -i -X POST http://127.0.0.1:6808/api/block/getBlockDOM -H \"Content-Type: application/json\" -d \"{\\\"id\\\":\\\"HEADING\\\"}\"`\n→ expect 403 (getBlockDOM is CheckAdminRole). This is how raw-DOM retrieval is supposed to be gated.\n\n5. THE PROOF: reader pulls the forbidden doc's content anyway\n\n`curl -i -X POST http://127.0.0.1:6808/api/block/getHeadingChildrenDOM -H \"Content-Type: application/json\" -d \"{\\\"id\\\":\\\"HEADING\\\"}\"`\n→ 200 status code and data contains the rendered HTML including UNIQUE_MARKER_99 hidden body text full content of a doc that is disabled from publishing, returned to an anonymous reader with no filter.\n\n### Suggested fix\n\nBring `fullTextSearchAssetContent` in line with its block-search twin: apply the `method == 2 && !IsAdminRoleContext` rejection, route the raw-SQL path through `CheckSingleStatement`/`CheckReadonlyStatement`, and add `ReplaceAll(exp, \"'\", \"''\")` in `assetContentFieldRegexp` to match `fieldRegexp`. Ideally run reader-reachable asset-content reads on a `_query_only=1` handle so no reader-reachable path can write or `ATTACH`.","state":0,"publishedAt":"2026-09-03T21:01:05+00:00","modifiedAt":"2026-09-10T15:25:36.094529+00:00","affected":[{"ecosystem":"Go","name":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20260721004815-cf42dd5680c8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-fph3-ghq9-vw66","https://nvd.nist.gov/vuln/detail/CVE-2026-69083","https://github.com/siyuan-note/siyuan/commit/cf42dd5680c8f2d50cebfada5d639c8d59faf50e","https://github.com/siyuan-note/siyuan","https://www.vulncheck.com/advisories/siyuan-before-sql-injection-via-fulltextsearchassetcontent"],"sourceUrl":"https://github.com/advisories/GHSA-fph3-ghq9-vw66","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-fph3-ghq9-vw66","identifiers":["GHSA-fph3-ghq9-vw66","CVE-2026-69083","GO-2026-6374"]},"retained":false,"historicalAffected":[]},{"revision":"5745bea1c76440e0b46461079809dbf4","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-6374","aliases":["CVE-2026-69083","GHSA-fph3-ghq9-vw66"],"title":"SiYuan: Unauthenticated SQL execution and REGEXP injection via fullTextSearchAssetContent (publish mode): reader-reachable raw SQL (method 2) and unescaped REGEXP (method 3) on read-write asset-content DB in github.com/siyuan-note/siyuan/kernel","description":"SiYuan: Unauthenticated SQL execution and REGEXP injection via fullTextSearchAssetContent (publish mode): reader-reachable raw SQL (method 2) and unescaped REGEXP (method 3) on read-write asset-content DB in github.com/siyuan-note/siyuan/kernel","state":0,"publishedAt":"2026-09-10T14:48:42+00:00","modifiedAt":"2026-09-10T15:15:13.5745723+00:00","affected":[{"ecosystem":"Go","name":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20260721004815-cf42dd5680c8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-fph3-ghq9-vw66","https://nvd.nist.gov/vuln/detail/CVE-2026-69083","https://github.com/siyuan-note/siyuan/commit/cf42dd5680c8f2d50cebfada5d639c8d59faf50e","https://www.vulncheck.com/advisories/siyuan-before-sql-injection-via-fulltextsearchassetcontent"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6374","license":"OSV · upstream source license applies","key":"osv:GO-2026-6374","identifiers":["GO-2026-6374","CVE-2026-69083","GHSA-fph3-ghq9-vw66"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-26T15:37:14.6597162+00:00","complete":true,"records":1756,"lastAttemptAt":"2026-10-26T15:37:14.6597162+00:00","lastSuccessAt":"2026-10-26T15:37:14.8359072+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:37:14.835909+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-5ba1945314e042c2ced14b33f3680fa71692812d925544312b218f5eb8a26e71-1bd091fc7fc10547d7167a606edbc49905944b97501a7ab971c3b58807479a43","complete":true,"records":414270,"lastAttemptAt":"2026-10-26T15:35:34.7444644+00:00","lastSuccessAt":"2026-10-26T15:35:34.5655912+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:35:34.7444644+00:00","snapshotPublishedAt":"2026-10-26T15:15:44+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-43321610382942b8ad8c85917eab1546","complete":false,"records":4735,"lastAttemptAt":"2026-10-26T15:37:42.3202578+00:00","lastSuccessAt":"2026-10-24T23:18:49.862+00:00","error":"InvalidDataException","lastVerifiedAt":"2026-10-24T23:18:49.862+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":3564,"expectedIdentifiers":13477},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-26T15:37:14.6597162+00:00","complete":true,"records":1093,"lastAttemptAt":"2026-10-26T15:37:14.6597162+00:00","lastSuccessAt":"2026-10-26T15:37:14.8367292+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:37:14.8367325+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-f470a37230314a1cb4fdd0380273a29f","complete":true,"records":13416,"lastAttemptAt":"2026-10-26T15:37:40.3021752+00:00","lastSuccessAt":"2026-10-26T15:37:40.298+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:37:40.298+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13477,"expectedIdentifiers":13477},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c3121b113ecd88f1c92ccfa0ec9757ddc8386e4c12afd2597450b815744f800a","complete":true,"records":9779,"lastAttemptAt":"2026-10-26T15:37:14.5249967+00:00","lastSuccessAt":"2026-10-26T15:37:14.3083004+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:37:14.5249967+00:00","snapshotPublishedAt":"2026-10-26T14:48:41+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-16ad89dfea13ab9e9b0108e63a759d63bd4559cc68b58491107d62ee35bbbaf2","complete":true,"records":1965,"lastAttemptAt":"2026-10-26T15:35:34.8406753+00:00","lastSuccessAt":"2026-10-23T16:01:26.4487605+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:35:34.8406753+00:00","snapshotPublishedAt":"2026-10-21T12:18:07+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-a393d8fe0ae8408f3e4cab413b76047090c8e4a3c0a186c79edf33c9a3d3af95","complete":true,"records":2995,"lastAttemptAt":"2026-10-26T15:37:14.6306288+00:00","lastSuccessAt":"2026-10-26T14:35:47.9640893+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:37:14.6306288+00:00","snapshotPublishedAt":"2026-10-26T14:18:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-e462c1c8904fe18fc1ab10d13d0abcd333d928efa63a77a5731657497361d59c","complete":true,"records":230805,"lastAttemptAt":"2026-10-26T15:37:06.3736048+00:00","lastSuccessAt":"2026-10-26T15:37:05.2219961+00:00","error":null,"lastVerifiedAt":"2026-10-26T15:37:06.3736048+00:00","snapshotPublishedAt":"2026-10-26T14:48:44+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null}]}