Skip to content
Heist/ feed
Back to feed
HighFix available

SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers

Type: advisorySources: OSV2 source records

Same CWE-862 family, found via an automated bulk sweep of every `/api/block/*` handler in `kernel/api/block.go` for the presence of any access-check reference (`IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`) anywhere in the function body. 17 of 28 candidate endpoints have none. Cross-checked against the file's own sibling functions (`getBlockInfo`, `getBlockDOM`, `getRefIDs`, etc.), which correctly implement the check, confirming this is a real, uneven gap rather than a deliberate design choice for the whole file. ### Summary 17 handlers in `kernel/api/block.go`, all gated only by `model.CheckAuth` with no admin-role requirement, return block content-derived text, structural metadata, or existence information for any block ID supplied, with no access check anywhere in the handler or, for the ones checked in detail, the model functions they call. This is CWE-862 (Missing Authorization), the same class as the companion advisories from this review round, found in a different file via a systematic bulk check rather than manual inspection of each function individually. ### Details Confirmed via automated extraction of every function body between `func NAME(c *gin.Context) {` and the next such declaration, then searching each for any of `IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`, or `PublishAccess`. The following contain none of these, at all: | Endpoint | What it discloses | |---|---| | `getRefText` | The block's actual reference

Products
github.com/siyuan-note/siyuan/kernel
Affected versions
Not specified
Fixed versions
0.0.0-20260804015139-bd067a4fe9b2
CVEs
CVE-2026-74904
Confirmed fixed CVEs
Not specified
Updated in this feed
28 Oct 2026, 08:47 UTC · Revision 1

Source evidence

SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers

core-osv · Original source

Published 2 Oct 2026, 23:05 UTC

Same CWE-862 family, found via an automated bulk sweep of every `/api/block/*` handler in `kernel/api/block.go` for the presence of any access-check reference (`IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`) anywhere in the function body. 17 of 28 candidate endpoints have none. Cross-checked against the file's own sibling functions (`getBlockInfo`, `getBlockDOM`, `getRefIDs`, etc.), which correctly implement the check, confirming this is a real, uneven gap rather than a deliberate design choice for the whole file. ### Summary 17 handlers in `kernel/api/block.go`, all gated only by `model.CheckAuth` with no admin-role requirement, return block content-derived text, structural metadata, or existence information for any block ID supplied, with no access check anywhere in the handler or, for the ones checked in detail, the model functions they call. This is CWE-862 (Missing Authorization), the same class as the companion advisories from this review round, found in a different file via a systematic bulk check rather than manual inspection of each function individually. ### Details Confirmed via automated extraction of every function body between `func NAME(c *gin.Context) {` and the next such declaration, then searching each for any of `IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`, or `PublishAccess`. The following contain none of these, at all: | Endpoint | What it discloses | |---|---| | `getRefText` | The block's actual reference

osv:GHSA-4vpg-gwqq-w44c

github.com/siyuan-note/siyuan/kernel

Fixed versions: 0.0.0-20260804015139-bd067a4fe9b2

Complete source record
{
  "id": "57eac3b144a0d4a453d43d1a0ffa8061c8ca86acf69ecd37812c5683c9954609",
  "url": "https://osv.dev/vulnerability/GHSA-4vpg-gwqq-w44c",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers",
    "summary": "Same CWE-862 family, found via an automated bulk sweep of every `/api/block/*` handler in `kernel/api/block.go` for the presence of any access-check reference (`IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`) anywhere in the function body. 17 of 28 candidate endpoints have none. Cross-checked against the file's own sibling functions (`getBlockInfo`, `getBlockDOM`, `getRefIDs`, etc.), which correctly implement the check, confirming this is a real, uneven gap rather than a deliberate design choice for the whole file. ### Summary 17 handlers in `kernel/api/block.go`, all gated only by `model.CheckAuth` with no admin-role requirement, return block content-derived text, structural metadata, or existence information for any block ID supplied, with no access check anywhere in the handler or, for the ones checked in detail, the model functions they call. This is CWE-862 (Missing Authorization), the same class as the companion advisories from this review round, found in a different file via a systematic bulk check rather than manual inspection of each function individually. ### Details Confirmed via automated extraction of every function body between `func NAME(c *gin.Context) {` and the next such declaration, then searching each for any of `IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`, or `PublishAccess`. The following contain none of these, at all: | Endpoint | What it discloses | |---|---| | `getRefText` | The block's actual reference",
    "evidence": "osv:GHSA-4vpg-gwqq-w44c",
    "products": [
      {
        "name": {
          "value": "github.com/siyuan-note/siyuan/kernel",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.0.0-20260804015139-bd067a4fe9b2",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "GHSA-4vpg-gwqq-w44c",
      "aliases": [
        "CVE-2026-74904",
        "GHSA-4vpg-gwqq-w44c",
        "GO-2026-6654"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.0.0-20260804015139-bd067a4fe9b2"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/siyuan-note/siyuan/kernel",
            "purl": "pkg:golang/github.com/siyuan-note/siyuan/kernel",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-4vpg-gwqq-w44c/GHSA-4vpg-gwqq-w44c.json"
          }
        }
      ],
      "modified": "2026-10-07T17:56:04.435399445Z",
      "provider": "osv",
      "references": [
        "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4vpg-gwqq-w44c",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-74904",
        "https://github.com/siyuan-note/siyuan/commit/bd067a4fe9b208c0858d8d9dc6220dc8affc403e",
        "https://github.com/siyuan-note/siyuan",
        "https://github.com/siyuan-note/siyuan/releases/tag/v3.8.0",
        "https://www.vulncheck.com/advisories/siyuan-before-missing-authorization-via-block-api"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-204",
          "CWE-862"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-02T23:05:33Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-74904",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 97141,
  "published_at": "2026-10-02T23:05:33+00:00"
}

SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers in github.com/siyuan-note/siyuan/kernel

core-osv · Original source

Published 7 Oct 2026, 14:10 UTC

SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers in github.com/siyuan-note/siyuan/kernel

osv:GO-2026-6654

github.com/siyuan-note/siyuan/kernel

Fixed versions: 0.0.0-20260804015139-bd067a4fe9b2

Complete source record
{
  "id": "da563a2ec0061e7040cbbd0a7aa4a4a1f73ae7aba3cface1596432a04e8e9c3f",
  "url": "https://osv.dev/vulnerability/GO-2026-6654",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers in github.com/siyuan-note/siyuan/kernel",
    "summary": "SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers in github.com/siyuan-note/siyuan/kernel",
    "evidence": "osv:GO-2026-6654",
    "products": [
      {
        "name": {
          "value": "github.com/siyuan-note/siyuan/kernel",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.0.0-20260804015139-bd067a4fe9b2",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "GO-2026-6654",
      "aliases": [
        "CVE-2026-74904",
        "GHSA-4vpg-gwqq-w44c",
        "GO-2026-6654"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.0.0-20260804015139-bd067a4fe9b2"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/siyuan-note/siyuan/kernel",
            "purl": "pkg:golang/github.com/siyuan-note/siyuan/kernel",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://vuln.go.dev/ID/GO-2026-6654.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-07T17:45:12.488229429Z",
      "provider": "osv",
      "references": [
        "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4vpg-gwqq-w44c",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-74904",
        "https://github.com/siyuan-note/siyuan/commit/bd067a4fe9b208c0858d8d9dc6220dc8affc403e",
        "https://github.com/siyuan-note/siyuan/releases/tag/v3.8.0",
        "https://www.vulncheck.com/advisories/siyuan-before-missing-authorization-via-block-api"
      ],
      "provider_metadata": {
        "url": "https://pkg.go.dev/vuln/GO-2026-6654",
        "review_status": "UNREVIEWED"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-74904",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 97101,
  "published_at": "2026-10-07T14:10:14+00:00"
}