CVE-2026-45148: Github.com/siyuan note/siyuan/kernel SiYuan Has Broken Access Control Vulnerability

MODERATE
Advisory Identifier: GHSA-fmh9-gpqh-g53g
CVSS 4.3
CWE-863
Published
Advisory Summary

CVE-2026-45148 is a MODERATE (CVSS 4.3) siyuan has broken access control vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/siyuan note/siyuan/kernel libraries in the Go ecosystem. The issue involves siyuan has broken access control in `/api/search/{searchasset,searchtag,searchwidget,searchtemplate}` publish-mode. Remediation is available by upgrading affected packages to version 0.0.0-20260512140701-d7b77d945e0d.

CVE-2026-45148 at a Glance

CVE Identifier CVE-2026-45148
GHSA Identifier GHSA-fmh9-gpqh-g53g
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/siyuan note/siyuan/kernel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-45148

To remediate this vulnerability, upgrade all affected Github.com/siyuan note/siyuan/kernel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/siyuan-note/siyuan/kernel fixed: 0.0.0-20260512140701-d7b77d945e0d
Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260512140701-d7b77d945e0d
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-45148, inspect your project dependencies for Github.com/siyuan note/siyuan/kernel:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

Analyze the terminal output to locate any version of Github.com/siyuan note/siyuan/kernel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260512140701-d7b77d945e0d), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/siyuan note/siyuan/kernel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The advisory `GHSA-c77m-r996-jr3q` patched `getBookmark` so that, when invoked by a publish-mode `RoleReader`, results are filtered through `FilterBlocksByPublishAccess` to remove entries from password-protected / publish-ignored notebooks. Four sibling search handlers in the same file did not receive the equivalent treatment and continue to expose metadata across the publish-access boundary. ### Details **Affected files / lines (v3.6.5):** `kernel/api/router.go:181-190` — all four endpoints registered with `CheckAuth` only, which the publish-service `RoleReader` JWT passes: ```go ginServer.Handle("POST", "/api/search/searchTag", model.CheckAuth, searchTag) ginServer.Handle("POST", "/api/search/searchTemplate", model.CheckAuth, searchTemplate) ginServer.Handle("POST", "/api/search/searchWidget", model.CheckAuth, searchWidget) ginServer.Handle("POST", "/api/search/searchAsset", model.CheckAuth, searchAsset) ``` `kernel/api/search.go` — none of the four handlers branches on `model.IsReadOnlyRoleContext(c)` to filter the response, while their *peers* in the same file do. Compare: ```go // :29-65 listInvalidBlockRefs — DOES filter: if model.IsReadOnlyRoleContext(c) { publishAccess := model.GetPublishAccess() blocks = model.FilterBlocksByPublishAccess(c, publishAccess, blocks) } // :67-93 getAssetContent — DOES filter (FilterAssetContentByPublishAccess) // :95-115 fullTextSearchAssetContent — DOES filter // :250-285 getEmbedBlock — DOES filter (FilterEmbedBlocksByPublishAccess) // :156-176 searchAsset — does NOT filter ret.Data = model.SearchAssetsByName(k, exts) // :178-196 searchTag — does NOT filter tags := model.SearchTags(k) ret.Data = map[string]any{"tags": tags, "k": k} // :198-213 searchWidget — does NOT filter widgets := model.SearchWidget(keyword) // :233-248 searchTemplate — does NOT filter templates := model.SearchTemplate(keyword) ``` `model.SearchAssetsByName`, `model.SearchTags`, `model.SearchWidget`, `model.SearchTemplate` operate over the entire workspace database / filesystem, not just the publish-visible subset. A `FilterTagsByPublishIgnore` helper *already exists* in `kernel/model/` and is used by `getTag` itself (`kernel/api/tag.go:58-62`), confirming the maintainers' intent. ### PoC End-to-end reproduction requires enabling the SiYuan publish service, marking one notebook as private to publish access, and obtaining a `RoleReader` JWT from the publish reverse-proxy (per `kernel/server/proxy/publish.go`). Once authenticated as the Reader against the publish port: ```bash # Returns ALL tags across the workspace, including ones drawn only from the publish-private notebook. curl -X POST https://<publish-host>/api/search/searchTag \ -H 'Authorization: Bearer <reader-jwt>' \ -H 'Content-Type: application/json' \ -d '{"k":""}' # Returns ALL asset filenames (e.g., CV.pdf, contract.docx, salary-2026.xlsx) regardless of source notebook. curl -X POST https://<publish-host>/api/search/searchAsset \ -H 'Authorization: Bearer <reader-jwt>' \ -H 'Content-Type: application/json' \ -d '{"k":""}' curl -X POST https://<publish-host>/api/search/searchWidget -H '...' -d '{"k":""}' curl -X POST https://<publish-host>/api/search/searchTemplate -H '...' -d '{"k":""}' ``` Each call returns the global result set without applying `FilterTagsByPublishIgnore` / `FilterAssetContentByPublishAccess` / equivalent. In this audit I source-confirmed the missing branch in v3.6.5 but did not stand up the full publish-service flow. The fix is straightforward enough that the source-level evidence should be sufficient for triage. ### Impact A publish-service Reader (the role assigned to anonymous publish visitors by default) can enumerate: - All tag strings used anywhere in the workspace — frequently contains person names, project codenames, internal identifiers. - All asset filenames uploaded to the workspace — frequently contains the contents of `CV.pdf`, `contract.docx`, `salary-2026.xlsx`, etc. - All widget names and template names installed in the workspace. This violates the publish-service trust boundary. Users intentionally mark notebooks as "invisible to publish" specifically to keep this metadata out of public reach.

CVE-2026-45148 Affected Github.com/siyuan note/siyuan/kernel Versions

1 component(s)
Fixed Versions:
0.0.0-20260512140701-d7b77d945e0d
Product / Package Ecosystem Affected Versions Fixed Version
github.com/siyuan-note/siyuan/kernel
Go
< 0.0.0-20260512140701-d7b77d945e0d
0.0.0-20260512140701-d7b77d945e0d

References

Frequently Asked Questions

What is CVE-2026-45148?
CVE-2026-45148 is a security vulnerability in Github.com/siyuan note/siyuan/kernel involving SiYuan has broken access control in `/api/search/{searchAsset,searchTag,searchWidget,searchTemplate}` publish-mode under CWE-863: Incorrect Authorization.
Which Github.com/siyuan note/siyuan/kernel versions are affected?
Affected versions include releases prior to 0.0.0-20260512140701-d7b77d945e0d across affected packages: github.com/siyuan-note/siyuan/kernel.
What version fixes CVE-2026-45148?
Upgrading to 0.0.0-20260512140701-d7b77d945e0d (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/siyuan-note/siyuan/kernel affected?
Yes, github.com/siyuan-note/siyuan/kernel is affected in releases prior to 0.0.0-20260512140701-d7b77d945e0d. Upgrade your dependency to 0.0.0-20260512140701-d7b77d945e0d or later.
What is the CVSS score of CVE-2026-45148?
CVE-2026-45148 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-45148?
CVE-2026-45148 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2026-45148?
Run the dependency tree command: 'inspect dependencies for github.com/siyuan-note/siyuan/kernel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fmh9-gpqh-g53g",
  "modified" : "2026-05-15T23:45:20Z",
  "published" : "2026-05-13T15:33:03Z",
  "aliases" : [ "CVE-2026-45148" ],
  "summary" : "SiYuan has broken access control in `/api/search/{searchAsset,searchTag,searchWidget,searchTemplate}` publish-mode",
  "details" : "### Summary\n\nThe advisory `GHSA-c77m-r996-jr3q` patched `getBookmark` so that, when invoked by a publish-mode `RoleReader`, results are filtered through `FilterBlocksByPublishAccess` to remove entries from password-protected / publish-ignored notebooks. Four sibling search handlers in the same file did not receive the equivalent treatment and continue to expose metadata across the publish-access boundary.\n\n### Details\n\n**Affected files / lines (v3.6.5):**\n\n`kernel/api/router.go:181-190` — all four endpoints registered with `CheckAuth` only, which the publish-service `RoleReader` JWT passes:\n\n```go\nginServer.Handle(\"POST\", \"/api/search/searchTag\",      model.CheckAuth, searchTag)\nginServer.Handle(\"POST\", \"/api/search/searchTemplate\", model.CheckAuth, searchTemplate)\nginServer.Handle(\"POST\", \"/api/search/searchWidget\",   model.CheckAuth, searchWidget)\nginServer.Handle(\"POST\", \"/api/search/searchAsset\",    model.CheckAuth, searchAsset)\n```\n\n`kernel/api/search.go` — none of the four handlers branches on `model.IsReadOnlyRoleContext(c)` to filter the response, while their *peers* in the same file do. Compare:\n\n```go\n// :29-65  listInvalidBlockRefs — DOES filter:\nif model.IsReadOnlyRoleContext(c) {\n    publishAccess := model.GetPublishAccess()\n    blocks = model.FilterBlocksByPublishAccess(c, publishAccess, blocks)\n}\n\n// :67-93  getAssetContent — DOES filter (FilterAssetContentByPublishAccess)\n// :95-115 fullTextSearchAssetContent — DOES filter\n// :250-285 getEmbedBlock — DOES filter (FilterEmbedBlocksByPublishAccess)\n\n// :156-176 searchAsset — does NOT filter\nret.Data = model.SearchAssetsByName(k, exts)\n\n// :178-196 searchTag — does NOT filter\ntags := model.SearchTags(k)\nret.Data = map[string]any{\"tags\": tags, \"k\": k}\n\n// :198-213 searchWidget — does NOT filter\nwidgets := model.SearchWidget(keyword)\n\n// :233-248 searchTemplate — does NOT filter\ntemplates := model.SearchTemplate(keyword)\n```\n\n`model.SearchAssetsByName`, `model.SearchTags`, `model.SearchWidget`, `model.SearchTemplate` operate over the entire workspace database / filesystem, not just the publish-visible subset. A `FilterTagsByPublishIgnore` helper *already exists* in `kernel/model/` and is used by `getTag` itself (`kernel/api/tag.go:58-62`), confirming the maintainers' intent.\n\n### PoC\n\nEnd-to-end reproduction requires enabling the SiYuan publish service, marking one notebook as private to publish access, and obtaining a `RoleReader` JWT from the publish reverse-proxy (per `kernel/server/proxy/publish.go`). Once authenticated as the Reader against the publish port:\n\n```bash\n# Returns ALL tags across the workspace, including ones drawn only from the publish-private notebook.\ncurl -X POST https://<publish-host>/api/search/searchTag \\\n     -H 'Authorization: Bearer <reader-jwt>' \\\n     -H 'Content-Type: application/json' \\\n     -d '{\"k\":\"\"}'\n\n# Returns ALL asset filenames (e.g., CV.pdf, contract.docx, salary-2026.xlsx) regardless of source notebook.\ncurl -X POST https://<publish-host>/api/search/searchAsset \\\n     -H 'Authorization: Bearer <reader-jwt>' \\\n     -H 'Content-Type: application/json' \\\n     -d '{\"k\":\"\"}'\n\ncurl -X POST https://<publish-host>/api/search/searchWidget   -H '...' -d '{\"k\":\"\"}'\ncurl -X POST https://<publish-host>/api/search/searchTemplate -H '...' -d '{\"k\":\"\"}'\n```\n\nEach call returns the global result set without applying `FilterTagsByPublishIgnore` / `FilterAssetContentByPublishAccess` / equivalent.\n\nIn this audit I source-confirmed the missing branch in v3.6.5 but did not stand up the full publish-service flow. The fix is straightforward enough that the source-level evidence should be sufficient for triage.\n\n### Impact\n\nA publish-service Reader (the role assigned to anonymous publish visitors by default) can enumerate:\n\n- All tag strings used anywhere in the workspace — frequently contains person names, project codenames, internal identifiers.\n- All asset filenames uploaded to the workspace — frequently contains the contents of `CV.pdf`, `contract.docx`, `salary-2026.xlsx`, etc.\n- All widget names and template names installed in the workspace.\n\nThis violates the publish-service trust boundary. Users intentionally mark notebooks as \"invisible to publish\" specifically to keep this metadata out of public reach.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/siyuan-note/siyuan/kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260512140701-d7b77d945e0d"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-fmh9-gpqh-g53g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45148"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/siyuan-note/siyuan"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-13T15:33:03Z",
    "nvd_published_at" : "2026-05-14T19:16:38Z"
  }
}