Sceawere
Vulnerability Detail
CVE-2026-82650UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
SiYuan Path Traversal Sensitive Exposure
Vulnerability Metadata
- Severity
- Medium
- Score / CVSS
- 4.4
- Creation Date
- 3h ago
- Vendor
- siyuan-note
- Product
- siyuan
- Attack Type
- Exposure of Resource to Wrong Sphere
- Vector String
- CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N
- Attack Complexity
- HIGH
Narrative and Response
Description
SiYuan 3.8.0 contains a path traversal / sensitive file exposure vulnerability in the RenderTemplate function (kernel/model/template.go), reachable via the POST /api/template/render endpoint (kernel/api/template.go). The endpoint restricts the supplied path only to the workspace directory (util.IsAbsPathInWorkspace) but, unlike the file API's refuseToAccess() blocklist, applies no sensitive-path exclusion. This allows an authenticated attacker to read sensitive workspace files, including conf/conf.json, which contains the API token and cookie signing key. The issue is fixed in v3.8.1.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "4.4",
"pubDate": "2026-08-30T15:16:45.610Z",
"pubdate": "2026-08-30T15:16:45.610Z",
"executiveSummary": "SiYuan version 3.8.0 is susceptible to a path traversal and sensitive file exposure vulnerability located within the template rendering engine.\nThe vulnerability allows an authenticated attacker to bypass intended directory restrictions to access arbitrary sensitive files residing within the workspace directory.\nThe primary risk involves the unauthorized retrieval of critical configuration files, such as 'conf/conf.json', which house sensitive authentication material including API tokens and cookie signing keys.\nSuccessful exploitation facilitates full account takeover and potential remote code execution or complete system compromise.\nThe flaw stems from a lack of path filtering mechanisms in the 'RenderTemplate' function that fails to exclude protected system files, even when workspace boundary checks are enforced.\nExploitation requires authenticated access to the application, posing a significant risk in multi-user or shared environments where non-administrative users can interact with the API.\nThis vulnerability is classified as a high-severity path traversal issue, necessitating immediate updates to version 3.8.1 to implement necessary exclusion logic.",
"technicalDetails": "The vulnerability resides in the 'RenderTemplate' function located in 'kernel/model/template.go', which is exposed via the 'POST /api/template/render' endpoint defined in 'kernel/api/template.go'.\nWhile the implementation utilizes 'util.IsAbsPathInWorkspace' to enforce directory boundaries, ensuring requested paths remain within the designated workspace, the validation logic is insufficient.\nUnlike the implementation found in the application's file API, which utilizes a 'refuseToAccess()' blocklist to explicitly prohibit access to sensitive internal files, the 'RenderTemplate' function lacks any mechanism to filter paths based on file sensitivity.\nAn authenticated attacker can craft a malicious request to the '/api/template/render' endpoint, specifying a path traversal sequence that resolves to restricted files within the workspace root.\nBecause the 'RenderTemplate' function processes the input and returns the content of the identified file without verifying if the path corresponds to sensitive configuration data, the system inadvertently discloses the contents of files like 'conf/conf.json'.\nThe exploitation flow proceeds as follows: 1) The attacker initiates an authenticated POST request to '/api/template/render'. 2) The input path is subjected to a validation check that confirms it resides within the workspace. 3) The validation succeeds because the path is physically within the workspace directory, despite pointing to a sensitive file. 4) The 'RenderTemplate' function retrieves the file contents. 5) The application renders the sensitive file content to the attacker in the response body.\nBy retrieving 'conf/conf.json', an attacker gains access to cleartext credentials, API tokens, and cryptographic keys used for signing session cookies. Possessing these keys allows an attacker to forge administrative cookies, effectively bypassing all authentication mechanisms and gaining full control over the SiYuan instance.\nThe vulnerability affects SiYuan version 3.8.0 and is successfully mitigated in version 3.8.1 by introducing appropriate blocklist filtering to the template rendering component."
}