GHSA-jv8v-xq2h-657v: Medium severity go/github.com/siyuan-note/siyuan/kernel vulnerability

Published Sep 3, 2026
·
Updated

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

go // 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.

Affected Software

1 affected componentFixes available
go/github.com/siyuan-note/siyuan/kernel<0.0.0-20260724095509-eee3410aa131
0.0.0-20260724095509-eee3410aa131

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/siyuan-note/siyuan/kernel to a version that resolves this vulnerability.

    Fixed in 0.0.0-20260724095509-eee3410aa131
  2. Configuration

    Ensure Publish.Auth.Enable is true so anonymous access to publish-mode endpoints is not permitted; anonymous + publish mode currently allows unauthenticated harvesting of workspace/asset paths from CheckAuth-only routes like /api/asset/getMissingAssets, /api/asset/getUnusedAssets, and /api/asset/resolveAssetPath.

    SiYuan (publish authentication) Publish.Auth.Enable = false/anonymous disable
  3. Configuration

    Add publish-access scoping to getUnusedAssets and getMissingAssets so results are limited to documents the caller may see; also apply the same redaction behavior as getConf for browser/reader requests—return the asset path relative to the workspace root (or omit the path) instead of returning the absolute host filesystem path.

    SiYuan kernel/api/asset.go (asset endpoints) publish-access scoping/redaction for getMissingAssets/getUnusedAssets = scoped+redacted
  4. Configuration

    Update /api/asset/resolveAssetPath (resolveAssetPath) to apply the same stripping/redaction used by getConf for browser/reader requests: return the asset path relative to the workspace root rather than the absolute host path; ensure publish/reader authorization scoping matches the caller's document access.

    SiYuan kernel/api/asset.go (resolveAssetPath) redaction for resolveAssetPath = return relative or omit absolute path

Event History

Sep 3, 2026
Advisory Published
via GitHub·11:00 PM
Data Sourced
via GitHub·11:00 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can access the vulnerable endpoint?

The endpoint is reachable by users with the publish RoleReader token. It is also reachable anonymously when Publish.Auth.Enable is false.

2

What does an attacker need to disclose the server path?

An attacker needs the relative path of an asset. Such paths may be obtainable from asset references, such as an <img src="assets/…"> element in a published document.

3

What information is exposed by a successful request?

The response returns the asset's resolved absolute filesystem path without redaction. This can disclose the operating-system username and the application's installation or workspace layout.

4

How can I determine whether an instance is affected?

Request POST /api/asset/resolveAssetPath with a known asset relative path using publish-reader access, or anonymously if publish authentication is disabled. An affected instance returns the full absolute workspace path rather than a redacted or relative path.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203