Skip to content
Heist/ feed
Back to feed
MediumFix available

SiYuan: authFilePublishAccess distinguishes hidden and forbidden documents from public and nonexistent ones, and issues a publish-auth cookie for documents it reports as forbidden

Type: advisorySources: OSV

### Summary `/api/filetree/authFilePublishAccess` is registered with `CheckAuth` only and is reachable anonymously. It never sets a failure code, so its outcome is signalled entirely by the response message and by whether a `Set-Cookie` header is present. Those two signals differ across access tiers, which lets an anonymous caller determine, for any candidate document identifier, whether that document is public or nonexistent, password-protected, or exists at the hidden or forbidden tier. Separately, hidden and forbidden entries carry an empty password. Submitting `password:""` therefore satisfies the equality check for them, and the server responds by issuing `Set-Cookie: publish-auth-` for a document whose own tier is forbidden. ### Details **Route,** identical on both refs: ```go ginServer.Handle("POST", "/api/filetree/authFilePublishAccess", model.CheckAuth, authFilePublishAccess) ``` No `CheckAdminRole`, no `CheckReadonly`. **Handler,** `kernel/api/filetree.go:1608` on the development branch and `:1421` on master. `ret.Code` is never assigned on the failure path, so every response carries `code:0`. The branch is: ```go if item.Password == password { // SetPublishAuthCookie } else { ret.Msg = Conf.Language(285) } ``` **The cookie is issued for forbidden documents.** Entries at the hidden and forbidden tiers store `Password == ""`. A request with `password:""` therefore makes `item.Password == password` true for them, and the handler takes the success branch. The server is

Products
github.com/siyuan-note/siyuan/kernel
Affected versions
Not specified
Fixed versions
0.0.0-20260731093152-c7522b8db586
CVEs
CVE-2026-73630
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 02:32 UTC · Revision 1

Source evidence

SiYuan: authFilePublishAccess distinguishes hidden and forbidden documents from public and nonexistent ones, and issues a publish-auth cookie for documents it reports as forbidden

core-osv · Original source

Published 23 Oct 2026, 18:31 UTC

### Summary `/api/filetree/authFilePublishAccess` is registered with `CheckAuth` only and is reachable anonymously. It never sets a failure code, so its outcome is signalled entirely by the response message and by whether a `Set-Cookie` header is present. Those two signals differ across access tiers, which lets an anonymous caller determine, for any candidate document identifier, whether that document is public or nonexistent, password-protected, or exists at the hidden or forbidden tier. Separately, hidden and forbidden entries carry an empty password. Submitting `password:""` therefore satisfies the equality check for them, and the server responds by issuing `Set-Cookie: publish-auth-` for a document whose own tier is forbidden. ### Details **Route,** identical on both refs: ```go ginServer.Handle("POST", "/api/filetree/authFilePublishAccess", model.CheckAuth, authFilePublishAccess) ``` No `CheckAdminRole`, no `CheckReadonly`. **Handler,** `kernel/api/filetree.go:1608` on the development branch and `:1421` on master. `ret.Code` is never assigned on the failure path, so every response carries `code:0`. The branch is: ```go if item.Password == password { // SetPublishAuthCookie } else { ret.Msg = Conf.Language(285) } ``` **The cookie is issued for forbidden documents.** Entries at the hidden and forbidden tiers store `Password == ""`. A request with `password:""` therefore makes `item.Password == password` true for them, and the handler takes the success branch. The server is

osv:GHSA-4pjg-x8qj-33j5

github.com/siyuan-note/siyuan/kernel

Fixed versions: 0.0.0-20260731093152-c7522b8db586

Complete source record
{
  "id": "80918b8b617f690bd4bd64a85be557c65d5ebeaa6cc226499f30e9ea7def2c75",
  "url": "https://osv.dev/vulnerability/GHSA-4pjg-x8qj-33j5",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "SiYuan: authFilePublishAccess distinguishes hidden and forbidden documents from public and nonexistent ones, and issues a publish-auth cookie for documents it reports as forbidden",
    "summary": "### Summary `/api/filetree/authFilePublishAccess` is registered with `CheckAuth` only and is reachable anonymously. It never sets a failure code, so its outcome is signalled entirely by the response message and by whether a `Set-Cookie` header is present. Those two signals differ across access tiers, which lets an anonymous caller determine, for any candidate document identifier, whether that document is public or nonexistent, password-protected, or exists at the hidden or forbidden tier. Separately, hidden and forbidden entries carry an empty password. Submitting `password:\"\"` therefore satisfies the equality check for them, and the server responds by issuing `Set-Cookie: publish-auth-` for a document whose own tier is forbidden. ### Details **Route,** identical on both refs: ```go ginServer.Handle(\"POST\", \"/api/filetree/authFilePublishAccess\", model.CheckAuth, authFilePublishAccess) ``` No `CheckAdminRole`, no `CheckReadonly`. **Handler,** `kernel/api/filetree.go:1608` on the development branch and `:1421` on master. `ret.Code` is never assigned on the failure path, so every response carries `code:0`. The branch is: ```go if item.Password == password { // SetPublishAuthCookie } else { ret.Msg = Conf.Language(285) } ``` **The cookie is issued for forbidden documents.** Entries at the hidden and forbidden tiers store `Password == \"\"`. A request with `password:\"\"` therefore makes `item.Password == password` true for them, and the handler takes the success branch. The server is",
    "evidence": "osv:GHSA-4pjg-x8qj-33j5",
    "products": [
      {
        "name": {
          "value": "github.com/siyuan-note/siyuan/kernel",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.0.0-20260731093152-c7522b8db586",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-4pjg-x8qj-33j5",
      "aliases": [
        "CVE-2026-73630",
        "GHSA-4pjg-x8qj-33j5"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.0.0-20260731093152-c7522b8db586"
                }
              ]
            }
          ],
          "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-4pjg-x8qj-33j5/GHSA-4pjg-x8qj-33j5.json"
          }
        }
      ],
      "modified": "2026-10-23T18:45:08.578898644Z",
      "provider": "osv",
      "references": [
        "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4pjg-x8qj-33j5",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-73630",
        "https://github.com/siyuan-note/siyuan/commit/c7522b8db586ef1e1d6fa98bbe7ca0eb9d019efe",
        "https://github.com/siyuan-note/siyuan",
        "https://github.com/siyuan-note/siyuan/releases/tag/v3.7.4-alpha.4",
        "https://www.vulncheck.com/advisories/siyuan-before-information-disclosure-via-authfilepublishaccess"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-203"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-23T18:31:42Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-73630",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 424603,
  "published_at": "2026-10-23T18:31:42+00:00"
}