Skip to content

SiYuan: Absolute filesystem path and OS username disclosure via resolveAssetPath

Moderate severity GitHub Reviewed Published Jul 24, 2026 in siyuan-note/siyuan • Updated Sep 3, 2026

Package

gomod github.com/siyuan-note/siyuan/kernel (Go)

Affected versions

< 0.0.0-20260724095509-eee3410aa131

Patched versions

0.0.0-20260724095509-eee3410aa131

Description

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.

References

@88250 88250 published to siyuan-note/siyuan Jul 24, 2026
Published to the GitHub Advisory Database Sep 3, 2026
Reviewed Sep 3, 2026
Last updated Sep 3, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(24th percentile)

Weaknesses

Authorization Bypass Through User-Controlled Key

The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. Learn more on MITRE.

CVE ID

CVE-2026-72802

GHSA ID

GHSA-jv8v-xq2h-657v

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.