GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

GHSA-JV8V-XQ2H-657V

Vulnerability from github – Published: 2026-09-03 23:00 – Updated: 2026-09-03 23:00
VLAI
Summary
SiYuan: Absolute filesystem path and OS username disclosure via resolveAssetPath
Details

CVE: This vulnerability corresponds to CVE-2026-72802.

Summary

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.

Details

// kernel/api/asset.go: resolveAssetPath
p, err := model.GetAssetAbsPathInBox(path, "")   // boxID="" → absolute workspace path
...
ret.Data = p                                     // returned raw, no stripping

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.

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.

Related unfiltered siblings in the same file, also CheckAuth-only with no publish scoping: - getMissingAssets: workspace-wide list of missing asset references - getUnusedAssets: every unused asset filename in the assets directory

Both return asset inventory spanning all documents, including publish-forbidden ones.

Verified at origin/master: resolveAssetPath returns the absolute path with no redaction, getConf contains the IsBrowserRequest stripping; all three routes are registered CheckAuth without CheckAdminRole.

Proof of Concept

Precondition: publish mode enabled (default port 6808); anonymous when Publish.Auth.Enable is false, otherwise any publish reader account.

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.

2. Resolve it as an anonymous reader:

POST http://127.0.0.1:6808/api/asset/resolveAssetPath
{"path":"assets/foo-20260101120000-abcdefg.png"}

3. Result: the response returns the absolute host path, e.g. C:\Users\<username>\SiYuan\data\assets\foo-...png disclosing the OS username and the full workspace/installation layout.

Control: getConf from the same anonymous session returns WorkspaceDir/DataDir/HomeDir blanked, confirming the project intends these values to be withheld from browser requests.

Related:

POST http://127.0.0.1:6808/api/asset/getUnusedAssets   {}
POST http://127.0.0.1:6808/api/asset/getMissingAssets  {}

Return workspace-wide asset inventory with no publish scoping.

Impact

An 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.

Suggested fix

Apply 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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/siyuan-note/siyuan/kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.0.0-20260724095509-eee3410aa131"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-72802"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-639"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-09-03T23:00:52Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "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\u0027s relative path trivially harvested from an `\u003cimg src=\"assets/\u2026\"\u003e` in any published document receives the server\u0027s 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=\"\" \u2192 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\\\u003cusername\u003e\\SiYuan\\data\\assets\\foo.png` or `/home/\u003cuser\u003e/\u2026`. 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\\\u003cusername\u003e\\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\u0027s 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.",
  "id": "GHSA-jv8v-xq2h-657v",
  "modified": "2026-09-03T23:00:52Z",
  "published": "2026-09-03T23:00:52Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-jv8v-xq2h-657v"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-72802"
    },
    {
      "type": "WEB",
      "url": "https://github.com/siyuan-note/siyuan/commit/eee3410aa131b76f1bd72e933d484cf1ece77e88"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/siyuan-note/siyuan"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/siyuan-before-information-disclosure-via-resolveassetpath"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "SiYuan: Absolute filesystem path and OS username disclosure via resolveAssetPath"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…