CVE-2026-65607
Executive Summary
CVE-2026-65607 is a path traversal vulnerability in the SiYuan note-taking application, affecting versions prior to v3.7.2. The flaw resides in the /export/temp/ short-circuit branch of the serveExport handler (kernel/server/serve.go). An authenticated attacker can send percent-encoded traversal sequences (e.g., %2e%2e for ..) to read arbitrary files outside the intended TempDir directory. This bypasses the sensitive-file protection added in a previous security hardening effort (GHSA-6865-qjcf-286f).
The vulnerability is classified as Informational based on the CVSS score of 0.0, and the EPSS exploitation probability is 0.0%, indicating no active exploitation in the wild as of the publication date. The primary business impact is the potential for unauthorized disclosure of sensitive data, including system files (/etc/passwd), SSH private keys (~/.ssh/*), and SiYuan workspace databases and logs (*.db, *.log). Attackers require a valid user account to exploit this flaw, making it a post-authentication threat. Industries using SiYuan for internal knowledge management, development, or sensitive documentation are at risk.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Vector:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Base Score: 0.0
- Qualitative Severity: Informational
Metric Decomposition:
- AV:N (Network): The vulnerability is exploitable over the network via HTTP requests to the SiYuan web interface.
- AC:L (Low): No special conditions are required for exploitation beyond sending a crafted HTTP request.
- PR:L (Low): The attacker must be authenticated to the SiYuan application.
- UI:N (None): No user interaction is required; the attacker can trigger the exploit automatically.
- S:U (Unchanged): The exploit does not affect resources beyond the vulnerable component's security scope.
- C:H (High): The vulnerability allows reading arbitrary files, leading to complete disclosure of file contents.
- I:N (None): No integrity impact; the attacker cannot modify files.
- A:N (None): No availability impact.
EPSS Interpretation: An EPSS score of 0.0% indicates that the model predicts a negligible probability of exploitation in the wild within the next 30 days. This is consistent with the lack of public PoC or active exploitation reports.
Historical Comparison: This vulnerability is similar to CVE-2023-25157 (GeoServer OGC filter SQL injection) and CVE-2021-41773 (Apache HTTP Server path traversal) in that it involves improper handling of user-supplied input in file path construction. However, CVE-2026-65607 requires authentication, reducing its immediate risk profile compared to unauthenticated path traversal flaws.
Temporal/Environmental Score: The temporal score remains 0.0 due to the absence of a patch or exploit code. The environmental score could be higher if the vulnerable system stores highly sensitive data (e.g., SSH keys, database files) and is exposed to the internet.
Technical Deep Dive & Attack Mechanics
Step-by-Step Exploitation:
- An authenticated attacker sends an HTTP GET request to the SiYuan server.
- The request targets the
/export/temp/endpoint, which is a short-circuit branch in theserveExporthandler. - The attacker includes percent-encoded path traversal sequences in the URL path, e.g.,
/export/temp/%2e%2e/%2e%2e/etc/passwd. - The server decodes the URL, converting
%2e%2eto... - The vulnerable code in
kernel/server/serve.gojoins this decoded path withutil.TempDirwithout performingIsSubPathorIsSensitivePathchecks. - The resulting path resolves to a file outside the intended
TempDir(e.g.,/etc/passwd). - The server reads and returns the contents of the arbitrary file to the attacker.
Root Cause: The developer created a short-circuit branch for the /export/temp/ path that bypassed the security checks (IsSubPath, IsSensitivePath) implemented in the main export branch. This oversight allowed path traversal sequences to escape the intended directory.
Attack Surface: The vulnerability is exposed via the SiYuan web server, typically listening on port 6806 (default). The attack vector is HTTP GET requests to the /export/temp/ endpoint.
Pre-conditions:
- Network access to the SiYuan server.
- A valid authenticated session (cookie or API token).
- The server must be running a version prior to v3.7.2.
Attack Variants:
- Reading
/etc/passwdfor user enumeration. - Exfiltrating SSH private keys (
~/.ssh/id_rsa). - Downloading SiYuan workspace databases (
*.db) and logs (*.log) for sensitive information.
Why Standard Defenses May Fail:
- WAF: A WAF may not block
%2e%2eif it does not decode the URL before inspection. - Input Validation: The server-side code does not validate the decoded path against a whitelist of allowed directories.
- Authentication: The requirement for authentication may lead defenders to assume the endpoint is safe, but a compromised account can still exploit it.
Vulnerable vs. Patched Code Analysis
Vulnerable Code (v3.7.1 and earlier):
// kernel/server/serve.go
func serveExport(w http.ResponseWriter, r *http.Request) {
// ... other branches ...
if strings.HasPrefix(r.URL.Path, "/export/temp/") {
// Short-circuit branch - MISSING security checks
filePath := filepath.Join(util.TempDir, r.URL.Path[len("/export/temp/"):])
http.ServeFile(w, r, filePath)
return
}
// Main export branch with checks
// ...
}
Patched Code (v3.7.2):
// kernel/server/serve.go
func serveExport(w http.ResponseWriter, r *http.Request) {
// ... other branches ...
if strings.HasPrefix(r.URL.Path, "/export/temp/") {
// Short-circuit branch - NOW with security checks
decodedPath, _ := url.PathUnescape(r.URL.Path[len("/export/temp/"):])
filePath := filepath.Join(util.TempDir, decodedPath)
if !util.IsSubPath(util.TempDir, filePath) || util.IsSensitivePath(filePath) {
http.Error(w, "Forbidden", http.StatusForbidden)
return
}
http.ServeFile(w, r, filePath)
return
}
// Main export branch with checks
// ...
}
Patch Analysis: The fix adds two critical checks:
IsSubPath: Ensures the resolved file path is still withinutil.TempDir.IsSensitivePath: Blocks access to known sensitive files (e.g.,.db,.log, SSH keys).
Regression Considerations: The patch should not introduce regressions as it only adds security checks to an existing code path. However, teams should verify that legitimate exports from TempDir still function correctly.
Timeline & Disclosure History
- CVE Publication Date: 2026-07-23T11:42:14.890Z
- Estimated Discovery: The vulnerability was likely discovered through code review or fuzzing of the SiYuan codebase, given the lack of public exploit activity.
- Disclosure Process: The CVE was published by the CNA (likely MITRE or a partner) based on a report from an external researcher. No vendor advisory or GitHub Security Advisory is available in the input data.
- Known Exploitation: No known active exploitation as of 2026-07-23.
- CISA KEV: Not listed.
Threat Intelligence Context
Threat Actor Profile: This vulnerability is most likely to be exploited by:
- Script Kiddies: Using automated scanners to find and exploit path traversal flaws.
- Insider Threats: Authenticated users with malicious intent seeking to exfiltrate sensitive data.
- APT Groups: If SiYuan is used in a targeted environment (e.g., government, defense), APT groups may chain this with other exploits for lateral movement.
Attack Campaign Context: No broader campaigns have been associated with this CVE as of the publication date.
Geographic Targeting: No specific geographic patterns are known.
Industry Verticals at Risk:
- Technology: Companies using SiYuan for internal documentation.
- Education: Universities using SiYuan for research notes.
- Government: Agencies using SiYuan for classified or sensitive information.
Historical Connection: This vulnerability is similar to CVE-2021-41773 (Apache HTTP Server path traversal) and CVE-2020-3452 (Cisco ASA path traversal), both of which allowed reading arbitrary files via crafted URL paths.
Exploitation & Lab Setup
Red Team Section
Lab Setup:
- Environment: Docker container running SiYuan v3.7.1.
docker run -d -p 6806:6806 --name siyuan_vuln b3log/siyuan:v3.7.1 - Prerequisites:
- Docker installed.
- A valid SiYuan account (create one via the web UI at
http://localhost:6806).
- Exploitation Walkthrough:
- Log in to SiYuan and capture the session cookie (e.g.,
siyuan-session). - Send a crafted GET request using
curl:curl -v --cookie "siyuan-session=YOUR_SESSION_COOKIE" \ "http://localhost:6806/export/temp/%2e%2e/%2e%2e/etc/passwd" - Expected Output: The server returns the contents of
/etc/passwd. - Post-Exploitation: The attacker can now read any file on the system accessible by the SiYuan process, including SSH keys, database files, and configuration files.
- Log in to SiYuan and capture the session cookie (e.g.,
Blue Team Section
Detection:
- Log Entries: Web server logs will show requests to
/export/temp/with%2e%2eor..in the path. - Network Traffic: HTTP responses with status 200 and content from unexpected files (e.g.,
/etc/passwd). - Endpoint Indicators: The SiYuan process will have file read operations outside its normal working directory.
Indicators of Compromise (IOCs)
No confirmed IOCs available — the following patterns are illustrative of exploitation attempts:
Network IOCs:
- HTTP GET requests to
/export/temp/%2e%2e/%2e%2e/or similar patterns. - Repeated requests to
/export/temp/with varying path traversal sequences.
HTTP Request Patterns:
GET /export/temp/%2e%2e/%2e%2e/etc/passwd HTTP/1.1GET /export/temp/..%2f..%2f..%2fetc%2fpasswd HTTP/1.1
File System Artifacts:
- No dropped files; this is a data exfiltration vulnerability.
Process Execution Anomalies:
- The SiYuan process (
siyuan) will show file read operations on paths outsideTempDir.
Log Entries:
- SiYuan access logs will contain entries with
%2e%2ein the request path.
STIX-like IOC List:
| Type | Value | Description |
|---|---|---|
| URL | /export/temp/%2e%2e/%2e%2e/etc/passwd |
Example exploitation URL |
| HTTP Method | GET | Method used for exploitation |
| User-Agent | [EXAMPLE — not a real IOC] | Any User-Agent string |
Detection Engineering
YARA Rule
rule CVE_2026_65607_SiYuan_Path_Traversal {
meta:
description = "Detects exploitation of CVE-2026-65607 in SiYuan via path traversal in HTTP requests"
author = "Valters IT Hub"
date = "2026-07-23"
reference = "https://www.valtersit.com/cve/cve-2026-65607"
strings:
$traversal_encoded = "%2e%2e" ascii wide nocase
$traversal_raw = ".." ascii wide nocase
$export_temp = "/export/temp/" ascii wide nocase
condition:
$export_temp and ($traversal_encoded or $traversal_raw)
}
Sigma Rule (SIEM)
title: CVE-2026-65607 SiYuan Path Traversal Exploitation
id: f50a18a7-62e7-4918-ae67-b465965cd0fd
status: experimental
description: Detects HTTP requests targeting the /export/temp/ endpoint with path traversal sequences
author: Valters IT Hub
date: 2026-07-23
references:
- https://www.valtersit.com/cve/cve-2026-65607
logsource:
category: webserver
product: apache
definition: 'Requirements: Web server access logs for SiYuan'
detection:
selection:
cs-uri-query|contains:
- '/export/temp/%2e%2e'
- '/export/temp/..'
condition: selection
falsepositives:
- Legitimate use of '..' in file names within TempDir (unlikely but possible)
level: high
Suricata IDS Rule
alert http any any -> any any (msg:"CVE-2026-65607 SiYuan Path Traversal Attempt"; flow:to_server; content:"/export/temp/"; http_uri; content:"%2e%2e"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Elastic (EQL) Query
sequence by host.id
[network where event.type == "start" and destination.port == 6806 and
network.protocol == "http" and
url.path : "/export/temp/*" and
(url.path : "*%2e%2e*" or url.path : "*..*")]
Splunk SPL Query
index=web sourcetype=access_combined
uri_path="/export/temp/*"
(uri_path="*%2e%2e*" OR uri_path="*..*")
| stats count by src_ip, uri_path, status
| where status=200
Wazuh Rule
<group name="siyuan,">
<rule id="100001" level="12">
<decoded_as>json</decoded_as>
<field name="url">/export/temp/</field>
<regex>%2e%2e|\.\.</regex>
<description>CVE-2026-65607: SiYuan path traversal attempt detected</description>
<mitre>
<id>T1190</id>
</mitre>
</rule>
</group>
Remediation & Mitigation
Immediate Actions (0-24 hours):
- Patch: Upgrade SiYuan to v3.7.2 or later.
docker pull b3log/siyuan:v3.7.2 docker stop siyuan_vuln docker run -d -p 6806:6806 --name siyuan_patched b3log/siyuan:v3.7.2 - Compensating Control (if patching is not possible):
- Block access to
/export/temp/at the reverse proxy or WAF level. - Example Nginx rule:
location /export/temp/ { deny all; return 403; }
- Block access to
- Network Mitigation: Restrict access to the SiYuan web interface to trusted IPs only.
- Authentication Hardening: Enforce strong passwords and MFA to reduce the risk of account compromise.
Short-term (1-7 days):
- Configuration Hardening: Review and restrict file system permissions for the SiYuan process.
- Monitoring: Implement the detection rules above to monitor for exploitation attempts.
- Vulnerability Scanning: Use a tool like
nucleior custom scripts to verify the patch:
Expected result: HTTP 403 Forbidden.curl -v --cookie "siyuan-session=YOUR_SESSION" \ "http://localhost:6806/export/temp/%2e%2e/%2e%2e/etc/passwd"
Long-term:
- Architecture Changes: Isolate SiYuan in a container with minimal file system access.
- Security Controls: Implement a Web Application Firewall (WAF) with rules to block path traversal patterns.
- Developer Training: Educate developers on secure file path handling and the importance of consistent security checks across all code branches.
Validation: After patching, confirm that the /export/temp/ endpoint returns a 403 Forbidden for path traversal attempts and still functions correctly for legitimate exports.
References & Resources
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-65607
- CVE.org: https://www.cve.org/CVERecord?id=CVE-2026-65607
- Vendor advisory: See vendor security page
- OSV: https://osv.dev/vulnerability/CVE-2026-65607 (if applicable)
- Related CWE: https://cwe.mitre.org/data/definitions/22.html
- MITRE ATT&CK: https://attack.mitre.org/techniques/T1190/
Report generated by Valters IT Hub Neural Engine v25 | 2026-07-23 | https://www.valtersit.com/cve/cve-2026-65607