{"answers":{"affected":"3 open source packages ship an affected version, including github.com/siyuan-note/siyuan/kernel.","exploited":"There is no known exploitation of GHSA-57v5-wqx3-cgj4 in the wild and no public exploit code.","fix":"Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260726004013-64c26e74bb82 or later.","what":"GHSA-57v5-wqx3-cgj4 is a vulnerability in github.com/siyuan-note/siyuan/kernel, published on 8 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-57v5-wqx3-cgj4 and fix it if it is affected.\n\nWhat it is: GHSA-57v5-wqx3-cgj4 is a vulnerability in github.com/siyuan-note/siyuan/kernel, published on 8 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-57v5-wqx3-cgj4 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/siyuan-note/siyuan/kernel (Go): affected all versions; fixed in 0.0.0-20260726004013-64c26e74bb82\n- github.com/siyuan-note/siyuan/kernel (Go): affected all versions; fixed in 0.0.0-20260726004013-64c26e74bb82\n- github.com/siyuan-note/siyuan/kernel (Go): affected all versions; fixed in 0.0.0-20260726004013-64c26e74bb82\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-57v5-wqx3-cgj4/ (Markdown: https://insights.sbomify.com/GHSA-57v5-wqx3-cgj4/index.md)","id":"GHSA-57v5-wqx3-cgj4","markdown":"https://insights.sbomify.com/GHSA-57v5-wqx3-cgj4/index.md","name":"GHSA-57v5-wqx3-cgj4","record":{"aliases":["GO-2026-6430"],"analysis":{"component_type":"desktop_application","fix_type":"patch","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"SiYuan note-taking app","requires_auth":"none","summary":"An unauthenticated attacker can retrieve database view structures and field visibility settings from SiYuan via an unprotected API endpoint.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Scope note (please read first)\n\nThis endpoint does not exist in v3.7.3 or on master. It was introduced on the development branch by commit `acfc02ee8` (\"Improve database field visibility across views\", #11020) and is live on `v3.7.4-alpha.1`, so it will ship in v3.7.4 unless gated first. No released stable version is affected.\n\n### Summary\n\n`/api/av/getAttributeViewFieldViews` is registered with `CheckAuth` only and applies no publish-access filtering. Given a database `avID`, it returns the complete view structure of that database: every view's name, icon, layout type and the per-field `Hidden` flag, regardless of whether the caller is authorized to see that database or those views.\n\nThe route registered immediately before it, `getAttributeViewKeys`, does gate reader roles.\n\n### Details\n\n| Item | Detail |\n|---|---|\n| Route | `kernel/api/router.go:530` `POST /api/av/getAttributeViewFieldViews` → `model.CheckAuth` → `getAttributeViewFieldViews` |\n| Middleware | `CheckAuth` only, no `CheckReadonly`, no `CheckAdminRole` |\n| Guard in handler | None. Greps for `IsReadOnlyRoleContext`, `publishAccess` and `Filter*` all return zero matches |\n| Exposed | For each entry in `attrView.Views`: `ID`, `Icon`, `Name`, `Type`, and the `Hidden` flag for the requested field |\n| Introduced by | `acfc02ee8` (feature), dev branch only |\n\n**The leak path.** The handler binds `avID` and `keyID`, validating them against the ID pattern only, then calls `GetAttributeViewFieldViews(avID, keyID)`. That function calls `av.ParseAttributeView(avID)`, which reads the database's storage file directly by identifier. There is no ownership check and no publish-access check anywhere on the path. The result is a per-view record for every view the database defines.\n\nWhat a reader learns is author-written: view names are typed by the user, and layout type distinguishes a table from a gallery or kanban. The `Hidden` flag additionally reveals, per view, which fields the author chose to conceal.\n\n**Guarded sibling, one route earlier.** `getAttributeViewKeys` (`kernel/api/router.go:529`) is also reader-reachable and does gate:\n\n```go\nif model.IsReadOnlyRoleContext(c) {\n    blockAttributeViewKeys = model.FilterBlockAttributeViewKeysByPublishAccess(c, publishAccess, ...)\n}\n```\n\nThe new route at 530 applies nothing equivalent.\n\nThis is worth flagging as more than an isolated omission. `acfc02ee8` added a new reader-reachable attribute-view endpoint during the same development cycle in which the surrounding attribute-view endpoints were being hardened. The same pattern produced an earlier exposure: `f2d966659`, which added encrypted-notebook unlock status for plugin consumption, created a reader-reachable disclosure on a surface that was otherwise being tightened. A check on new reader-reachable routes against the gating applied to their registered neighbours would catch this class before release.\n\n**Reachability, stated honestly.** The endpoint requires a valid `avID` and `keyID`. `renderAttributeView` supplies both to a reader for any database embedded in a document the reader can access. The realistic target is therefore a partially-published database: the document publishes one view, and this endpoint enumerates the existence, name, layout type and hidden-field configuration of the database's other views, including views the author did not publish. Against a database with no reader-accessible surface at all, obtaining the identifiers is harder, particularly since the `getAttributeViewKeysByID` enumeration path was closed on the development branch. The severity below reflects that constraint rather than a worst case.\n\n### Proof of Concept\n\nPrecondition: `v3.7.4-alpha.1` build, publish mode enabled (default port 6808), anonymous when `Publish.Auth.Enable` is `false`, otherwise any publish reader account. A database embedded in a reader-accessible document, with at least one additional view that is not published.\n\nStep 1, obtain the identifiers through the reader-accessible path:\n\n```\nPOST http://127.0.0.1:6808/api/av/renderAttributeView\n{\"id\":\"\u003cblock id of the embedded database in a published doc\u003e\"}\n\n→ 200, returns the published view together with its key identifiers\n```\n\nStep 2, enumerate the rest of the database's views:\n\n```\nPOST http://127.0.0.1:6808/api/av/getAttributeViewFieldViews\n{\"avID\":\"\u003cavID from step 1\u003e\",\"keyID\":\"\u003ckeyID from step 1\u003e\"}\n\n→ 200, returns a record per view: ID, Icon, Name, Type, Hidden\n```\n\nThe response includes views that were never published, disclosing their author-written names, their layout types, and which field is hidden in each.\n\n### Impact\n\nAn anonymous reader in publish mode, or any publish `RoleReader`, can enumerate the full view structure of a database when only part of that database is published. View names are author-written free text and frequently describe the data they filter, so this discloses the existence and subject matter of unpublished views. The per-field `Hidden` flags additionally reveal the author's concealment choices across those views. Confidentiality only, with no integrity or availability impact, and bounded by the reader needing identifiers obtainable from a reader-accessible database.\n\n### Suggested fix\n\nGate the handler for read-only roles, mirroring `getAttributeViewKeys`: when `IsReadOnlyRoleContext(c)` holds, resolve the block that owns the `avID` and apply the publish-access check before returning any view record, or filter the returned set through the same `FilterBlockAttributeViewKeysByPublishAccess` path its neighbour uses.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Scope note (please read first) This endpoint does not exist in v3.7.3 or on master.","id":"GHSA-57v5-wqx3-cgj4","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"information_disclosure","year":"2026"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.0.0-20260726004013-64c26e74bb82"],"introduced":["0"],"last_affected":[],"package":"github.com/siyuan-note/siyuan/kernel","purl":null,"source":"GHSA-57v5-wqx3-cgj4"},{"ecosystem":"Go","fixed":["0.0.0-20260726004013-64c26e74bb82"],"introduced":["0"],"last_affected":[],"package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"GHSA-57v5-wqx3-cgj4"},{"ecosystem":"Go","fixed":["0.0.0-20260726004013-64c26e74bb82"],"introduced":["0"],"last_affected":[],"package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"GO-2026-6430"}],"products":null,"published":"2026-09-08","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An unauthenticated attacker can retrieve database view structures and field visibility settings from SiYuan via an unprotected API endpoint.","url":"https://insights.sbomify.com/GHSA-57v5-wqx3-cgj4/"}