Skip to content

Commit cb1f6e0

Browse files
1 parent df2869f commit cb1f6e0

4 files changed

Lines changed: 202 additions & 44 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-72xp-24p9-7vpf",
4+
"modified": "2026-09-03T23:00:03Z",
5+
"published": "2026-08-12T21:31:42Z",
6+
"withdrawn": "2026-09-03T23:00:03Z",
7+
"aliases": [],
8+
"summary": "Duplicate Advisory: Absolute filesystem path and OS username disclosure via resolveAssetPath",
9+
"details": "## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-jv8v-xq2h-657v. This link is maintained to preserve external references.\n\n## Original Description\nSiYuan versions before v3.7.4 contain an information disclosure vulnerability in the resolveAssetPath endpoint that returns absolute filesystem paths unmodified to CheckAuth-only requests. Attackers can harvest relative asset paths from published documents and submit them to resolveAssetPath to obtain the server's absolute workspace path, disclosing the operating-system username and installation layout.",
10+
"severity": [
11+
{
12+
"type": "CVSS_V3",
13+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
14+
},
15+
{
16+
"type": "CVSS_V4",
17+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/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"
18+
}
19+
],
20+
"affected": [
21+
{
22+
"package": {
23+
"ecosystem": "Go",
24+
"name": "github.com/siyuan-note/siyuan/kernel"
25+
},
26+
"ranges": [
27+
{
28+
"type": "ECOSYSTEM",
29+
"events": [
30+
{
31+
"introduced": "0"
32+
},
33+
{
34+
"last_affected": "3.7.2"
35+
}
36+
]
37+
}
38+
]
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-jv8v-xq2h-657v"
45+
},
46+
{
47+
"type": "ADVISORY",
48+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-72802"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "https://www.vulncheck.com/advisories/siyuan-before-information-disclosure-via-resolveassetpath"
53+
}
54+
],
55+
"database_specific": {
56+
"cwe_ids": [
57+
"CWE-639"
58+
],
59+
"severity": "MODERATE",
60+
"github_reviewed": true,
61+
"github_reviewed_at": "2026-09-03T23:00:03Z",
62+
"nvd_published_at": "2026-08-12T20:17:52Z"
63+
}
64+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-jv8v-xq2h-657v",
4+
"modified": "2026-09-03T23:00:52Z",
5+
"published": "2026-09-03T23:00:52Z",
6+
"aliases": [
7+
"CVE-2026-72802"
8+
],
9+
"summary": "SiYuan: Absolute filesystem path and OS username disclosure via resolveAssetPath",
10+
"details": "**CVE:** This vulnerability corresponds to [CVE-2026-72802](https://nvd.nist.gov/vuln/detail/CVE-2026-72802).\n\n### Summary\n\n`POST /api/asset/resolveAssetPath` returns the resolved **absolute** filesystem path of an asset, unmodified. The route is `CheckAuth`-only, so it is reachable by the publish `RoleReader` token and by the anonymous account when `Publish.Auth.Enable` is `false`. An anonymous reader who knows any asset's relative path trivially harvested from an `<img src=\"assets/…\">` in any published document receives the server's absolute workspace path, disclosing the operating-system username and the installation layout.\n\n### Details\n\n```go\n// kernel/api/asset.go: resolveAssetPath\np, err := model.GetAssetAbsPathInBox(path, \"\") // boxID=\"\" → absolute workspace path\n...\nret.Data = p // returned raw, no stripping\n```\n\n`GetAssetAbsPathInBox(path, \"\")` resolves under `util.DataDir` / `util.WorkspaceDir`, producing a full host path such as `C:\\Users\\<username>\\SiYuan\\data\\assets\\foo.png` or `/home/<user>/…`. The handler returns it directly with no redaction and no publish-scope check.\n\n**This is data the project already treats as sensitive.** `getConf` explicitly zeroes `System.WorkspaceDir`, `AppDir`, `ConfDir`, `DataDir`, and `HomeDir` when `util.IsBrowserRequest(c)`, a change made specifically to avoid leaking the username (issue #17410). `resolveAssetPath` performs no equivalent stripping, so it re-exposes precisely the values `getConf` was patched to hide.\n\n**Related unfiltered siblings** in the same file, also `CheckAuth`-only with no publish scoping:\n- `getMissingAssets`: workspace-wide list of missing asset references\n- `getUnusedAssets`: every unused asset filename in the assets directory\n\nBoth return asset inventory spanning all documents, including publish-forbidden ones.\n\nVerified at `origin/master`: `resolveAssetPath` returns the absolute path with no redaction, `getConf` contains the `IsBrowserRequest` stripping; all three routes are registered `CheckAuth` without `CheckAdminRole`.\n\n### Proof of Concept\n\nPrecondition: publish mode enabled (default port 6808); anonymous when `Publish.Auth.Enable` is `false`, otherwise any publish reader account.\n\n**1. Harvest an asset path**: open any published document and read a relative asset path from its markup, e.g. `assets/foo-20260101120000-abcdefg.png`.\n\n**2. Resolve it as an anonymous reader:**\n```\nPOST http://127.0.0.1:6808/api/asset/resolveAssetPath\n{\"path\":\"assets/foo-20260101120000-abcdefg.png\"}\n```\n\n**3. Result:** the response returns the absolute host path, e.g.\n`C:\\Users\\<username>\\SiYuan\\data\\assets\\foo-...png` disclosing the OS username and the full workspace/installation layout.\n\n**Control:** `getConf` from the same anonymous session returns `WorkspaceDir`/`DataDir`/`HomeDir` blanked, confirming the project intends these values to be withheld from browser requests.\n\n**Related:**\n```\nPOST http://127.0.0.1:6808/api/asset/getUnusedAssets {}\nPOST http://127.0.0.1:6808/api/asset/getMissingAssets {}\n```\nReturn workspace-wide asset inventory with no publish scoping.\n\n### Impact\n\nAn anonymous reader (publish mode with auth disabled) or any publish `RoleReader` obtains the server's absolute workspace path, which typically embeds the OS username, plus the installation directory layout. This is useful for targeting subsequent attacks (path construction, user enumeration, social engineering) and directly contradicts the redaction the project applies in `getConf`. The related endpoints additionally disclose workspace-wide asset inventory, including assets referenced only by publish-forbidden documents. Confidentiality-only.\n\n### Suggested fix\n\nApply the same redaction `getConf` uses: for browser/reader requests, return the asset path relative to the workspace root rather than the absolute host path (or omit it entirely). Add publish-access scoping to `getUnusedAssets` and `getMissingAssets` so their results are limited to documents the caller may see.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/siyuan-note/siyuan/kernel"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "0.0.0-20260724095509-eee3410aa131"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-jv8v-xq2h-657v"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-72802"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/siyuan-note/siyuan/commit/eee3410aa131b76f1bd72e933d484cf1ece77e88"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/siyuan-note/siyuan"
54+
},
55+
{
56+
"type": "WEB",
57+
"url": "https://www.vulncheck.com/advisories/siyuan-before-information-disclosure-via-resolveassetpath"
58+
}
59+
],
60+
"database_specific": {
61+
"cwe_ids": [
62+
"CWE-639"
63+
],
64+
"severity": "MODERATE",
65+
"github_reviewed": true,
66+
"github_reviewed_at": "2026-09-03T23:00:52Z",
67+
"nvd_published_at": null
68+
}
69+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-qvq9-hq6p-v378",
4+
"modified": "2026-09-03T22:58:29Z",
5+
"published": "2026-09-03T22:58:29Z",
6+
"aliases": [
7+
"CVE-2026-72803"
8+
],
9+
"summary": "SiYuan: Missing publish-access filter on getBlockAttrs and batchGetBlockAttrs discloses block attributes (name, alias, memo, custom fields) of protected documents",
10+
"details": "**CVE:** This vulnerability corresponds to [CVE-2026-72803](https://nvd.nist.gov/vuln/detail/CVE-2026-72803).\n\n### Summary\n\n`POST /api/attr/getBlockAttrs` and `POST /api/attr/batchGetBlockAttrs` return a block's full attribute set (IAL) with no publish-access check. Both are `CheckAuth`-only, so they are reachable by the publish `RoleReader` token and by the anonymous account when `Publish.Auth.Enable` is `false`. An anonymous reader supplying a block ID receives the block's name, alias, memo, bookmark, tags, and every `custom-*` attribute including for blocks in publish-forbidden and password-protected documents. The batch variant accepts an ID list, making it a bulk extraction primitive.\n\n### Details\n\nNeither handler applies a filter:\n\n```go\n// /api/attr/getBlockAttrs (router line 301)\nret.Data = sql.GetBlockAttrs(id)\n\n// /api/attr/batchGetBlockAttrs (router line 302)\nret.Data = sql.BatchGetBlockAttrs(idList)\n```\n\n`sql.GetBlockAttrs` is a direct database read returning the block's entire IAL: `name`, `alias`, `memo`, `bookmark`, `tags`, and any `custom-*` key/value the user has set. Several of these are user-authored free text memos in particular are freeform notes attached to a block so this is document content, not merely structural metadata.\n\n`batchGetBlockAttrs` takes an arbitrary list of block IDs in a single request, so an attacker holding a set of block IDs can sweep attributes across the entire workspace in one call.\n\n**Guarded-sibling asymmetry.** The sibling metadata endpoint `getBlockInfo` calls `checkBlockPublishAccess(c, id, ret)` before returning; `getBlockAttrs` and `batchGetBlockAttrs` call nothing.\n\nVerified at `origin/master`: both handler bodies contain no publish-access, publish-ignore, or readonly-role check, and both routes are registered `CheckAuth` without `CheckAdminRole`.\n\n### Proof of Concept\n\nPrecondition: publish mode enabled (default port 6808); anonymous when `Publish.Auth.Enable` is `false`, otherwise any publish reader account. A document is marked publish-forbidden (or password-protected) and contains a block with a memo and a custom attribute set.\n\n**Single-block disclosure:**\n```\nPOST http://127.0.0.1:6808/api/attr/getBlockAttrs\n{\"id\":\"<BLOCK_ID_IN_PROTECTED_DOC>\"}\n```\nReturns the block's IAL: `name`, `alias`, `memo`, `bookmark`, `tags`, and all `custom-*` values.\n\n**Bulk disclosure:**\n```\nPOST http://127.0.0.1:6808/api/attr/batchGetBlockAttrs\n{\"ids\":[\"<ID1>\",\"<ID2>\",\"<ID3>\"]}\n```\nReturns the attribute sets for every supplied ID in one response, with no per-ID authorization.\n\n**Control:** the sibling `getBlockInfo` with the same block ID is refused by `checkBlockPublishAccess`, confirming the boundary is enforced elsewhere and omitted here.\n\n### Impact\n\nAn anonymous reader (publish mode with auth disabled) or any publish `RoleReader` can read block attributes belonging to publish-forbidden and password-protected documents, including user-authored memos and arbitrary `custom-*` values. The batch endpoint turns this into a bulk primitive: given a set of block IDs, an attacker retrieves attributes across the whole workspace in a single request. Confidentiality-only.\n\n### Suggested fix\n\nCall `checkBlockPublishAccess` in `getBlockAttrs` before returning, matching `getBlockInfo`. For `batchGetBlockAttrs`, apply the check per ID and drop unauthorized entries from the response rather than failing the whole batch.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/siyuan-note/siyuan/kernel"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "0.0.0-20260724093256-229fdffd7e4a"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-qvq9-hq6p-v378"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-72803"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/siyuan-note/siyuan/commit/229fdffd7e4afdef543d4d8495657fda8a369400"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/siyuan-note/siyuan"
54+
},
55+
{
56+
"type": "WEB",
57+
"url": "https://www.vulncheck.com/advisories/siyuan-before-information-disclosure-via-getblockattrs"
58+
}
59+
],
60+
"database_specific": {
61+
"cwe_ids": [
62+
"CWE-862"
63+
],
64+
"severity": "MODERATE",
65+
"github_reviewed": true,
66+
"github_reviewed_at": "2026-09-03T22:58:29Z",
67+
"nvd_published_at": null
68+
}
69+
}

advisories/unreviewed/2026/08/GHSA-72xp-24p9-7vpf/GHSA-72xp-24p9-7vpf.json

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)